Bot latency is not one number. Gateway acknowledgement time, an HTTPS request to Discord and a user’s complete command response measure different paths. A fast API connection cannot hide a slow database query inside the command handler.
Name the measurement before comparing it
| Signal | What it helps assess |
|---|---|
| Gateway heartbeat acknowledgement | The persistent Discord connection |
| HTTP request duration | DNS, connection, TLS and response time for one endpoint |
| Command duration | Queueing, application work and the reply path |
| Regional reference estimate | Planning context from another measurement environment |
The location selector’s Discord API estimates are regional references, not measurements from your running bot. They do not establish a guaranteed latency, voice quality or the exact route from an EnderHost server. Measure on the deployed service when choosing between locations.
Take a small, labelled sample
curl -sS -o /dev/null -w "dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} total=%{time_total}
" https://discord.com/api/v10/gatewayThis Linux shell example makes one unauthenticated HTTPS request and reports seconds. The timing values are cumulative milestones, so TLS time is not an additional amount to add to total. It measures this HTTP transaction, not a Gateway WebSocket session. Avoid aggressive polling.
Compare like with like
- Record the source location, timestamp, endpoint and whether the connection is fresh.
- Repeat a modest sample during ordinary and problematic periods.
- Measure command handlers and their dependencies at the same time.
- Compare typical values and spikes, not only the fastest result.
- Use actual bot behavior to confirm a location change helped.
Investigate late command responses before buying resources for an unexplained ping number. For broader connection failures, use the latency diagnostic guide.
Sources and references
Hosting documentation. Publication and update dates reflect this edition.
Related articles
- Fixing “The Application Did Not Respond” on Discord CommandsTrace command delivery, acknowledgement and follow-up work instead of blaming server ping alone.2 min read
- Diagnosing latency and lagTell a network problem apart from a server performance problem.1 min read
- VPS Monitoring: CPU, Memory, Disk and Useful AlertsConnect operating-system metrics to application symptoms and test the alert path before relying on it during an outage.3 min read
