Partial high ping on some shards
Sometimes some shards have a very high ping for me. Unfortunately, I can't figure out why. I've already disabled individual events and some bot functions, but nothing has helped. Is there an event or function that could give me more information? Furthermore, these shards do not have significantly more users or guilds than the others.

2 Replies
There is really so much to this question that is missing, and it's never an easy answer...
Shard load doesn't directly affect ping, so disabling events or functions won't help
What do you use for metrics? You could use that to log gateway latency over time per shard, along with host system metrics (CPU, memory, network throughput) and maybe your process's event loop lag (with something like
node:perf_hooks
)
Usually if the loop delay grows during the spikes, it's your code or host resources; if the loop looks fine but latency still jumps, it's more likely a network or Discord routing you to regions that are slower