OpenAI has published a technical deep dive into the evolution of Habitat, its internal online storage platform, revealing how the system scaled to support over 1 billion users across 40 geographic regions. The second part of a two-part series focuses on the underlying storage component, Azure Cosmos DB, and the architectural shifts required to handle more than 500 petabytes of data while maintaining millisecond-level response times.
What Happened
Habitat serves as the central data access layer for OpenAI products, requiring the company to balance reliability, performance, and developer velocity. According to the company’s report, the team initially relied on Azure Cosmos DB’s native primitives but encountered significant challenges with logical partition key collisions and "noisy neighbor" issues, where one tenant’s heavy workload degraded performance for others. To mitigate this, OpenAI temporarily moved to a single-tenancy model with separate containers for critical use cases. However, this approach created operational bottlenecks, including complex capacity planning and risks of under-provisioning during product launches.
The company reports that it eventually reverted to a multi-tenancy approach, this time co-managing the infrastructure closely with Azure engineers. This partnership enabled the development of specific features such as hot key throttling, Quality of Service (QoS) tiers to prioritize interactive requests over bulk data operations, and a new serverless mode that allows physical partitions to scale up to 10,000 Request Units per second (RU/s). These changes allowed OpenAI to consolidate back into shared containers, reducing the need for manual capacity planning by individual product teams.
Why It Matters
The evolution of Habitat highlights the limitations of standard managed cloud services at extreme scales. OpenAI notes that as it became one of the largest users of Azure Cosmos DB, the service required a "co-managed" model to address failure modes that only appeared at OpenAI’s volume. For instance, regional outages revealed that failover times for OpenAI’s largest accounts could take several hours, a latency unacceptable for real-time AI applications. Joint engineering efforts between OpenAI and Azure teams resulted in improvements to gateway scalability, connection pooling, and metadata caching, directly impacting the stability of ChatGPT and other consumer-facing AI products.
For the broader industry, the report underscores the trade-offs between multi-tenancy and single-tenancy in large-scale AI infrastructure. While single-tenancy offers isolation, it burdens organizations with fragmented capacity planning. Multi-tenancy offers efficiency but requires sophisticated isolation mechanisms to prevent performance interference. OpenAI’s solution—combining multi-tenancy with advanced throttling and QoS—provides a blueprint for other tech giants navigating similar scaling hurdles. Additionally, the company’s strategy of using distributed lookaside caching with Valkey servers to mitigate cross-region latency offers insights for global AI deployments where data residency and performance constraints often conflict.
The Bottom Line
OpenAI’s Habitat platform now serves over 20 million queries per second from its largest Azure Cosmos DB account, a scale the company claims is unique in its deployment context. By shifting to a co-managed infrastructure model and implementing rigorous performance optimizations, OpenAI has stabilized its storage layer to support rapid product iteration and global user growth. The case study demonstrates that at the frontier of AI scale, traditional boundaries between application developers and cloud providers must blur to ensure reliability and performance.