Guild sharding is coming soon, after we test & deploy it internally.
You'll soon be able to specify a shard in the ready packet. This will cause the gateway to operate in shard mode, which will distribute guilds between each shard. The shard key is a tuple of {shard_id, num_shards}, where shard_id is a number starting at 0 and less than num_shards. num_shards must be a number greater than 1 (having 1 as num_shards is kinda pointless as that's the default mode of operation).
In shard mode, the distribution of guilds is calculated by (guild_id >> 22) % num_shards == shard_id. Guilds that are not on your shard will not appear on the shard list, meaning they will not show up in the guilds object in the ready packet, and that you won't receive any events for guilds not on your shard. DMs will only be sent to shard_id 0. This will make processing of DMs a bit tricky on the bot side, but still possible.
Todo List:
Guild sharding is coming soon, after we test & deploy it internally.
You'll soon be able to specify a
shardin the ready packet. This will cause the gateway to operate in shard mode, which will distribute guilds between each shard. The shard key is a tuple of{shard_id, num_shards}, where shard_id is a number starting at0and less thannum_shards.num_shardsmust be a number greater than 1 (having1asnum_shardsis kinda pointless as that's the default mode of operation).In shard mode, the distribution of guilds is calculated by
(guild_id >> 22) % num_shards == shard_id. Guilds that are not on your shard will not appear on the shard list, meaning they will not show up in theguildsobject in the ready packet, and that you won't receive any events for guilds not on your shard. DMs will only be sent toshard_id 0. This will make processing of DMs a bit tricky on the bot side, but still possible.Todo List:
September 30, 2016October 10, 2016Jan 3, 2017