Gateway opcode limits versus REST rate limits for presence synchronization
0 reputation · 16 Jan 2021, 03:48 UTC
A Discord bot must maintain accurate presence status across guilds while operating within gateway and REST rate-limit boundaries. The choice affects both event latency and request volume.
Gateway presence updates consume opcode slots subject to a per-guild throughput ceiling, whereas REST API presence calls operate under a separate request quota and introduce HTTP overhead. Shard distribution, intent configuration, and partial strategies each shift the balance between opcode consumption and request count.
- At what guild and shard count does gateway opcode consumption exceed REST request overhead for presence synchronization?
- How does enabling partial presence intents affect the frequency of required REST calls to fetch full presence data?
- What back-off strategy minimizes disconnect risk when gateway opcode thresholds are approached under burst traffic?