#Replicated/Sharded Command Handling
1 messages · Page 1 of 1 (latest)
why do you have 2 replicas? Should just use the DiscordShardedClient instead
i'd like to be able to scale horizontally. multi host rather than one host with multiple shards. i'd rather throw more hosts at a scale issue than more cpu/ram on an individual box
also, if the bot goes down, there's no backup. it is just down. with replication, if one replica fails, no big deal
Use grpc with a central handler then like I used to
And have it so that each instance is started with two arguments, the current shard id and total number of shards.
Be warned that this approach increases memory usage by a lot since each shard will need to be initialized separately
For example my bot had 8 shards at around 32gb of usage, after using only sharded client and one instance it uses only 6.
THANK YOU THIS MAKES SENSE