You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, GUILD_MEMBER_UPDATEs are a big problem for large discord bots. A quick primer is when a Large bot updates anything todo with it's profile (https://discord.com/developers/docs/resources/user#modify-current-user) this triggers a GUILD_MEMBER_UPDATE to be sent for every single guild associated with that session across all sessions. I cannot understate how much traffic this is all at once. Especially for bots in Millions of servers. This often overloads underlying hardware and leads to downtime.
This has been an issue for a long time it it means that large bots often cannot and should not update anything todo with their profile. However with the awesome new bot profile improvements (such as gif avatars and banners) this issue is starting to surface as developers are wanting to take advantage of these features.
If this only affected your own bot it wouldn't be so serious and could be planned for but the issue is it doesn't... if you share a large amount of servers with another large scale bot, as often is the case. Them updating their bot profile causes the same problem too occur, GUILD_MEMBER_UPDATE for every single guild you share with them.
TL;DR: Large bots editing their profile causes a GMU in every single server they are in. Fine for users, ddos for bots.
There have been some discussions in the past on how we might approach or fix such an issue but they all boil down to one goal. Taking it from an event per guild per session to an event per session.
Loose idea on how we might fix it:
Add a new Gateway event for when bots update their profile ie: BOT_UPDATE
BOT_UPDATE would be sent for global profile updates, and GUILD_MEMBER_UPDATE could still be sent for server profiles (if maintaining such a feature for bots is desired), role updates, etc
Client libraries would be expected to iterate over their member caches for each guild and patch them, simplified pseudo code of this concept:
Some form of de duplication should take place to prevent millions of confirmations (GUILD_MEMBER_UPDATE's) of the same information being delivered to all sessions on a per guild basis
Current Behavior
You recieve a GUILD_MEMBER_UPDATE per guild per session across all sessions.
Screenshots/Videos
No response
Client and System Information
This affects all Discord library clients & OS's
The text was updated successfully, but these errors were encountered:
Description
Hi,
GUILD_MEMBER_UPDATE
s are a big problem for large discord bots. A quick primer is when a Large bot updates anything todo with it's profile (https://discord.com/developers/docs/resources/user#modify-current-user) this triggers aGUILD_MEMBER_UPDATE
to be sent for every single guild associated with that session across all sessions. I cannot understate how much traffic this is all at once. Especially for bots in Millions of servers. This often overloads underlying hardware and leads to downtime.This has been an issue for a long time it it means that large bots often cannot and should not update anything todo with their profile. However with the awesome new bot profile improvements (such as gif avatars and banners) this issue is starting to surface as developers are wanting to take advantage of these features.
If this only affected your own bot it wouldn't be so serious and could be planned for but the issue is it doesn't... if you share a large amount of servers with another large scale bot, as often is the case. Them updating their bot profile causes the same problem too occur,
GUILD_MEMBER_UPDATE
for every single guild you share with them.TL;DR: Large bots editing their profile causes a GMU in every single server they are in. Fine for users, ddos for bots.
There have been some discussions in the past on how we might approach or fix such an issue but they all boil down to one goal. Taking it from an event per guild per session to an event per session.
Loose idea on how we might fix it:
BOT_UPDATE
BOT_UPDATE
would be sent for global profile updates, andGUILD_MEMBER_UPDATE
could still be sent for server profiles (if maintaining such a feature for bots is desired), role updates, etcSteps to Reproduce
Have/create a large discord application in a few million servers, trigger an update via https://discord.com/developers/docs/resources/user#modify-current-user or through the https://discord.dev dashboard. Observe
GUILD_MEMBER_UPDATE
for each guild the application is apart of.Expected Behavior
Some form of de duplication should take place to prevent millions of confirmations (
GUILD_MEMBER_UPDATE
's) of the same information being delivered to all sessions on a per guild basisCurrent Behavior
You recieve a
GUILD_MEMBER_UPDATE
per guild per session across all sessions.Screenshots/Videos
No response
Client and System Information
This affects all Discord library clients & OS's
The text was updated successfully, but these errors were encountered: