#Discord Bot Clustering
1 messages · Page 1 of 1 (latest)
Use sharing, get every container aware of the how many'th it is and map that to the shard number
But you need that only if you get to a lot of servers
yeah. its because my bot is approaching 10k servers and commands are starting to slow down a bit. Is there any documentation for pycord or discord.py (also works) which shows how to cluster across different machines. I
Not really. You can use docker swarm probably the easiest
And this
All about Sharding Discord Bots.
Horizontal scaling with Redis Cluster
in terms of simply running the bot, start your bot and pass shard_count, which is the total number of shards that will be running on your entire bot, and shard_ids, the shards that you want the specific cluster to run
Btw I was wondering, is there some kind of calculation to know how many shards you want in total ?
Yeah I'll have to figure some deployment strategy out for clustering
I'm saying for myself
So would I just launch the exact same bot with same token just providing a different shard_ids list
one caveat
cache won't be for the entire bot
just the one cluster
Ohk so I would need a lot of ram
not necessarily
Ok
i mean like
the cluster will only have the data for the guilds it's running on
not all the guilds
yeah
Ok
http routes will still work
Fair enough I could find a way to do that
Yeah I was just thinking of using a DB
but those are a little nuts
Ig