Discord Rate Limits and Shared IPs, Explained

How-toBy discordbothostUpdated 3 min read

The short answer: Discord limits requests per route and per bot, and can temporarily restrict addresses after too many invalid requests. A shared address can connect otherwise separate workloads. Follow your library's retry handling, fix repeated authentication failures and avoid restart loops. discordbothost separates shared Free and paid outgoing addresses and applies connection limits to each tier.

The limits that matter

Reference · Article updated
LimitApplies toValue
Global HTTPPer bot (per IP if no auth header)50 requests/second
Per-routePer bot, per route/bucketSent in X-RateLimit-* headers
Invalid requests ("Cloudflare ban")Per IP address10,000 per 10 minutes
Gateway sendPer connection120 events / 60 seconds
IdentifyPer bot, all shards1,000 per 24 hours

Why shared IPs matter

Most budget hosts run many customers' bots behind a few outgoing IPs. That's normal and usually fine. But Discord's invalid-request restriction counts by IP, so a neighbor stuck in a 401 loop (bad token) or ignoring 429s can get the shared IP restricted for a while. Your bot then fails too, through no fault of its own.

Keep your own bot clean

  1. Use your library's built-in rate-limit handling. discord.js, discord.py and JDA queue requests and respect retry_after. Don't bypass them with raw HTTP calls in a loop.
  2. Stop on 401/403. A bad token or missing permission won't fix itself. Log it and stop retrying.
  3. Register slash commands once, not on every restart.
  4. Batch and cache. Don't fetch the same member or channel on every message.
  5. Avoid crash loops. Each restart re-identifies, and identifies are capped per day.

What to ask a host

  • How many customers share each outgoing IP?
  • Are free and paid customers on the same IP?
  • Is a dedicated IP available, and what does it cost? Sparked Host lists one at +$7/month, for example.

How discordbothost does it

On discordbothost, free bots and paid bots leave through separate shared outgoing addresses, and each tier has its own connection limits. A spike from free bots can't use up the address paid bots rely on. Every bot runs in its own container, so one bot's crash loop doesn't affect another's resources. A dedicated IP add-on is planned but not offered yet.

Sources

https://discord.com/developers/docs/topics/rate-limits; https://discord.com/developers/docs/events/gateway; sparkedhost.com/discord-bot-hosting. Checked .

Questions

What are Discord's main rate limits for bots?

Per Discord's docs: a global limit of 50 API requests per second per bot, per-route limits returned in headers, 120 gateway events per connection per 60 seconds, and a restriction for IPs that make 10,000 invalid requests (401, 403 or 429) in 10 minutes.

Can other bots on my host get me rate limited?

The global limit is per bot token, but the invalid-request restriction applies to the IP address. If many bots share one outgoing IP and some misbehave, everyone behind that IP can be restricted.

How does discordbothost handle shared IPs?

Free bots and paid bots leave through separate shared outgoing addresses, each with its own per-tier connection limits, so heavy free usage can't push paid bots into an IP restriction.

  1. 1https://discord.com/developers/docs/topics/rate-limits
  2. 2https://discord.com/developers/docs/events/gateway
  3. 3https://discordbothost.com/pricing/

Related