Skip to content

Take the shard count and identify concurrency from Discord by default - #263

Merged
merlinfuchs merged 2 commits into
merlin/consolidatefrom
merlin/gateway-recommendation
Sep 20, 2026
Merged

merlinfuchs merged 2 commits into
merlin/consolidatefrom
merlin/gateway-recommendation

Conversation

@merlinfuchs

Copy link
Copy Markdown
Owner

Both now default to whatever Discord recommends for the bot rather than being hardcoded. shard_count = 0 asks for the recommended count, so a self hoster configures nothing and a growing bot doesn't outgrow a number someone wrote down once. identify_concurrency = 0 uses what Discord granted.

identify_concurrency is new and only goes down. Discord's grant is a hard ceiling, but lowering it spreads the GUILD_CREATE burst at startup over more time, which is the lever when the process is CPU bound while all the shards come up. Tonight's profile had all 8 cores saturated at the point the first shards went zombie.

One REST call at boot when either is unset, and both are logged along with the remaining session budget.

@merlinfuchs
merlinfuchs merged commit fbabdc4 into merlin/consolidate Sep 20, 2026
1 check passed
@merlinfuchs
merlinfuchs deleted the merlin/gateway-recommendation branch September 20, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant