performance concerns regarding presence_update
Hello, I track online/total member counts. How many events a second should i throw at a shard? It's super vague, but hoping there's a general range I can follow
9 Replies
I'm only monitoring around 100k users at the moment, and I am not struggling with performance as far as I can tell. Just curious at what point I should actually start sharding
Getting your bot's member count
-
client.users.cache.size
is unreliable because it will only return cached users
- The preferred method is using collection.reduce()
on client.guilds.cache
don't need presences for total members
you do for online though, but I'm not sure what you mean with "How many events a second should i throw at a shard"
I track actively online members
a live count
I am just curious how many events a single discord shard can handle
well that's just limited by your resources
there's no real way to tell except in production from your own performance metrics
What about just the most average kind of server out there
I can get the exact specs if needed
I don't need anything too specific, just like, 100, 5k, 10k
there's no formula for that, it's just a matter of resources pretty much, maybe someone with big bots can tell you an average of events per guild but that wouldn't mean your resources can (or can't) handle that
Alright, thank you