What OpenAI disclosed

OpenAI published the second part of an engineering series on Habitat, the online storage platform behind ChatGPT, the API, Codex and its internal services, on 23 October. The post is the most detailed public account so far of the database layer underneath the company’s products, and the figures in it are OpenAI’s own.

Habitat responds in milliseconds to over 1 billion users across 40 geographic regions and serves more than 500 petabytes of data. OpenAI’s largest single Azure Cosmos DB account stores tens of petabytes and serves more than 20 million queries per second. “To our knowledge, we are the only company which has deployed Azure Cosmos DB at this scale,” the post says.

Reads are over 90% of Habitat’s traffic. Three changes — replicating the most latency-critical datasets into nearby regions, an in-region caching layer on Valkey, and rewriting the service from Python into Rust — cut global median read latency from roughly 120 milliseconds to roughly 10, which OpenAI calls a 12-fold improvement since it began focusing on performance this year.

A fibre optic patch panel with bundles of cables
Median read latency fell from about 120 milliseconds to about 10. Illustrative stock photograph. Brett Sayles · pexels · Pexels License

A documented limit that cannot be reached

The most useful disclosure for anyone else running the same service is an admission about the published limits. Azure Cosmos DB documents a 10,000 request-unit-per-second ceiling per logical partition key. OpenAI says that in practice logical partitions are unable to reach it, because limits are enforced on the underlying physical partition, which the logical keys share.

A second failure mode follows from the same design. When a physical partition hits its storage limit it splits, and each child inherits half the throughput. OpenAI describes the result plainly: for its storage-heavy workloads, data growth alone reduces throughput capacity even while request rates stay flat.

The company went multi-tenant, then moved critical workloads to dedicated containers to contain the blast radius, then went back to a single shared container once per-team capacity planning stopped scaling. Microsoft built OpenAI a new serverless mode that lets every physical partition reach 10,000 RU/s and splits on request-unit usage as well as storage.

Two outages, one of them during the fix

OpenAI describes two incidents. In late 2024, a power outage hit the primary Azure region for one of its largest Cosmos DB accounts. The failover exercise revealed that those accounts would take several hours to move to a secondary region — something, OpenAI says, neither its team nor the Cosmos DB team had tested at that scale.

About a month later, failing the same accounts back triggered a second serious outage. A connection stampede overwhelmed the original region’s Cosmos DB gateway, because the gateway-mode client made every client reconnect and send requests there even though only some physical partitions had moved back.

A stack of hard disk drives
The two outages were found through failover and failback. Illustrative stock photograph. Marta Branco · pexels · Pexels License

The part that reads as a decision

The conclusion OpenAI draws is organisational: at sufficient scale, a managed service stops being managed. The two teams now share dashboards, test against a production-sized non-production account, and can page each other directly rather than through support tiers.

The conclusion it draws in engineering is bigger. To scale conversation storage “for the next billion users”, OpenAI says it has been building a custom in-house exabyte-scale online storage system for its bulkiest data types. It combines the RocksDB Cloud core from Rockset — the company OpenAI acquired in 2024 — with Raft-based replication, implements the same document model as Azure Cosmos DB, and trades peak queries per second for disaggregated storage and physical replication that need less flash.

That is a company whose compute is on Azure writing its own replacement for an Azure database. The system is described as in development, with no date attached.