status-sharding questions
hey so I have setup my manager like this:
And my bot is almost at 1.9k servers.
In the docs it says that if I dont provide the option for "totalShards", it will auto calculate that.
Now my questions:
1. How how does it calculate that? Like what guilds per shard-amount is it calculating?
2. If my bot would reach the amount to need a second shard, will it "autospawn" or do I need to restart my bot then
10 Replies
so for first the first, discord has /gateway/bot endpoint that is being fetched which returns recommended amout of shards
for second it wont auto spawn a second shard because we dont actually know live count of guilds your bot has, in order to do that we would need to fetch that discord's endpoint every minute or what not, so yeah, but general rule of thumb is 1k servers per shard, and then 7 shards per cluster, of course you can scale more shards per cluster but that all depends on your hardware since more shards = more memory but less cpu
so I should already have 2 shards with my 3rd almost starting?
uh kinda, i mean if i were in that scenario i would just have set like 4 shards and 2 clusters
why 2 clusters tho
cuz distribution, its just preference
of performance?
not sure how's performance in that case
okay and last question.
if I were to fetch idk with a "cron.schedule" every 30min / 1hour, the guild count and divide it by 1000, etc. and detect that a new shard should spawn, how do I do that
i mean why would you do that either way tho, its just generally recommended to restart fully and let all shards connect at once, you should start worrying about live reclustering when you reach millions of servers
:Okay: