Integration & APIs 22 Sep 2026 31 min read

Making the client carry it: ten years of Discord's gateway contract

How a push platform moves the cost of fanout onto third-party consumers, reconstructed from 237 dated entries in Discord's published API change log between July 2017 and September 2026, plus the gateway documentation, its rejected pull requests and the package registries that date the ecosystem's response.

A fanout platform pays for connected consumers multiplied by events, and it cannot deploy a fix to consumers it does not own. This guide reconstructs the six controls Discord added to its gateway contract over nine years (admission, delegated partitioning, declared subscriptions, hydration limits, reconnect steering and metering), the reported failures that provoked each one, and what Matrix and Bluesky did instead. After reading it you can price your own push contract, choose where the narrowing belongs, and sequence a capability withdrawal so the substitute, not the announcement, sets the deadline.

The finding that surprised me

Every capability Discord took back had a pull-shaped substitute shipped first: interactions landed in December 2020, twenty months before message content became privileged, so the substitute's ship date rather than the capacity problem sets the deprecation date.

What you get out of it

  • The contract, not the server tier, is the only fanout cost lever that has no floor: Discord's own Elixir libraries show the server-side lever bottoming out at about 70 microseconds per send.
  • Filtering declared at the handshake saves the fanout; filtering applied per request, as Matrix specifies for lazy loading, only saves the bandwidth, and the specification says outright it need not be precise.
  • Partitioning can be delegated for free by publishing a formula over an immutable id, which is why Discord holds no per-consumer placement state and extended the same shard parameter to its HTTP API in September 2026.
  • Adoption pressure works without a breaking cut-off: apps that ignored resume_gateway_url in 2022 were promised they would be 'disconnected significantly faster than normal'.
  • The cost of a contract change is exported to client libraries, and the registries measure it: discord.py published nothing for 432 days across the intents and message-content window, and every discord.js major lands within weeks of a contract change.

Scope

Why this, now. Discord re-cut its privileged-intent gate by user count in June 2026 and began obfuscating channel metadata in August 2026, which makes this the year its nine-year narrowing arc becomes legible end to end.

What it does not cover. Discord's storage tier, voice infrastructure, client applications and internal service topology, none of which appear in the repository record, and Discord's own incident write-ups, which are published on a host the research environment could not reach.

Open the field guide → Self-contained: it loads nothing at read time, follows your system theme, and prints cleanly.