---
title: "Distributing Global State to Serve over 1 Billion Daily Requests"
description: "Render's request routers evolved from per-instance in-memory caches with 5-minute TTLs and database lookups on miss, which overloaded PostgreSQL on every redeploy and failed during database downtime, to push-based caching using PostgreSQL LISTEN/NOTIFY so routers never query the database in the hot path."
url: "https://swe.quest/articles/distributing-global-state-to-serve-over-1-billion-daily-requests-65554ed0d12e6461"
canonical: "https://render.com/blog/distributing-global-state-to-serve-over-1-billion-daily-requests"
source: "Render"
published: "2024-05-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["caching","scalability","postgres","load-balancing","system-design"]
---

# Distributing Global State to Serve over 1 Billion Daily Requests

A post on [Render](https://swe.quest/sources/render.md), published 2024-05-23, 11 min read, Case study. Original: [https://render.com/blog/distributing-global-state-to-serve-over-1-billion-daily-requests](https://render.com/blog/distributing-global-state-to-serve-over-1-billion-daily-requests)

## Summary

Render's request routers evolved from per-instance in-memory caches with 5-minute TTLs and database lookups on miss, which overloaded PostgreSQL on every redeploy and failed during database downtime, to push-based caching using PostgreSQL LISTEN/NOTIFY so routers never query the database in the hot path. That change cut p99 routing time to under 4ms and propagated updates in under a second. Going multi-region exposed database connection limits and slow router startup, fixed by adding per-cluster shared cache instances that serve snapshots, record fetches and WebSocket update streams. Routers pin to a single cache to avoid inconsistent state, and startup in distant regions fell from over a minute to under twenty seconds.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- in-memory caching ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- reverse proxies and request routing ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))

## Keywords

Render, PostgreSQL, LISTEN/NOTIFY, Kubernetes, WebSocket

## Related posts

- [Keeping it 100(x) with real-time data at scale](https://swe.quest/articles/keeping-it-100-x-with-real-time-data-at-scale-3b49e279c5a600f2.md): Figma · 2024-05-17 · Medium · 19 min read · Caching, Real-time systems, Scaling, PostgreSQL, System design
  Figma rebuilt LiveGraph, its real-time GraphQL-like subscription service over Postgres, to scale reads and database update load 100x as the database moved from one instance to vertical and horizontal shards.
- [Scaling PostgreSQL to power 800 million ChatGPT users](https://swe.quest/articles/scaling-postgresql-to-power-800-million-chatgpt-users-dfa96876f4563ed2.md): OpenAI · 2026-01-22 · Medium · 11 min read · PostgreSQL, Scaling, Replication, Resilience, Caching
  OpenAI serves millions of queries per second for ChatGPT and its API from a single unsharded Azure PostgreSQL primary plus nearly 50 geo-distributed read replicas, despite load growing more than 10x in a year.
- [A Deep Dive into PolyScale’s Architecture](https://swe.quest/articles/a-deep-dive-into-polyscale-s-architecture-4fc7b2915489e809.md): Neon · 2023-12-18 · Medium · 11 min read · Caching, PostgreSQL, CDN & edge, Performance engineering
  PolyScale is a wire-protocol proxy cache that sits between an application and its database (here, Neon serverless Postgres), routing connections to the nearest edge PoP and caching query results with TTLs it learns automatically from arrival rate, result change rate and related "query templates".
- [The architecture of Neki](https://swe.quest/articles/the-architecture-of-neki-b0a20bdb70a4c3cd.md): PlanetScale · 2026-09-18 · Medium · 9 min read · PostgreSQL, Distributed databases, Replication, System design, Kubernetes
  Neki shards unmodified PostgreSQL behind a single connection string.
- [Let Your AWS Lambdas Survive Thousands of Connections](https://swe.quest/articles/let-your-aws-lambdas-survive-thousands-of-connections-95ac0e1f5340c6dd.md): Neon · 2024-12-02 · Medium · 13 min read · Serverless, PostgreSQL, Cloud platforms, JavaScript, Scaling
  Lambda's per-instance database connections can overwhelm Aurora Serverless v2 during traffic spikes, causing connection exhaustion, lingering zombie connections and cold-start latency, and RDS Proxy adds cost, pinning issues and borrow latency without fully fixing it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
