2026-11-26 15:49 UTC

OpenAI details Habitat’s 500-PB storage platform and reports 12× faster reads

state: significantheat: mediumuncertainty: mediumrelevance: highai-infrastructure storage-systems openaiOpenAI

What is this?

OpenAI’s September 11, 2026 engineering post describes Habitat, its internal online storage platform for ChatGPT and other products: the company says it serves over 1 billion people weekly, handles 70M+ requests per second across almost 40 regions, and stores 500+ petabytes. The October 23 follow-up adds details on Azure Cosmos DB, multi-tenancy, caching and global performance. OpenAI reports global read p50 latency fell from about 120 ms to 10 ms; it also says an in-development, exabyte-scale storage system is intended to support future growth. These are first-party engineering claims, not independently verified metrics.

Why it matters

This is a useful look at the less visible infrastructure that makes large AI products responsive and dependable. OpenAI describes how it evolved Habitat from a client library into a centralized, globally distributed storage platform, balancing reliability, latency, workload isolation and capacity planning. The account also shows how AI coding tools may help with infrastructure work: OpenAI says two engineers used Codex and GPT‑5.5 to rewrite Habitat’s service in Rust. These techniques could inform other high-scale systems, though the metrics and productivity claims are from OpenAI, not independent evaluations.

Current assessment

OpenAI’s September 11, 2026 post says Habitat supports ChatGPT, API, Codex and internal services, handling 70M+ requests per second across almost 40 regions and storing 500+ PB for products used by over 1B people weekly. Part I explains the move from a Python client library to a standalone service, which centralized deployments and security controls; it details engineering measures for tail latency, load balancing and predictable request costs. OpenAI says that in Q2 2026 two engineers, using Codex and GPT‑5.5, rewrote the service in Rust; Rust handles 95% of production requests, with reported 6x CPU and 15x memory efficiency versus Python. The October 23 Part II adds the storage-layer account: OpenAI says it worked with Azure to return to multi-tenancy using hot-key throttling, request QoS and improved serverless scaling, and reports no provisioning or noisy-neighbor incidents in the months since. It describes CDC-driven distributed caching and selective replication, reporting global read p50 improving from about 120 ms to about 10 ms. OpenAI also says it is developing an in-house exabyte-scale online storage system based on RocksDB Cloud and Raft; this is a plan under development, not a generally available system. These are detailed first-party operational claims; the supplied sources do not independently validate the figures or causal performance claims. Useful follow-up: track deployment of the custom system and any further technical detail on cost, consistency, reliability and capacity constraints.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p10momentum: steady4 platformsage 1829h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

09-11 17:30 (minted)⭐ origin echo-reconstructedThe linked first-party engineering article is described as an account of rapidly scaling online storage to serve over one billion ChatGPT us
OpenAI on blog (echo) · attributed from hn.story.49661841 · published time unknown
—
09-11 10:00first on openai · published · lag ?Rapidly scaling online storage to serve over 1 billion ChatGPT users
OpenAI
—
09-11 17:13first on hacker news · published · lag ?Rapidly scaling online storage to serve over 1B ChatGPT users
meetpateltech
—
10-08 16:11first on r/OpenAI · published · lag ?Chat GPT 6 Has Lost Access To Saved Memories
ItsAGarbageAccount
—
10-26 16:05first on r/ChatGPT · published · lag ?How OpenAI scaled its storage layer to serve over 1 billion ChatGPT users, part II
rhiever
—
09-11 17:13amplified on hacker newshn.story.49661841
meetpateltech
peak 9 · 0 comments · 25% of case engagement
09-12 02:07amplified on hacker newshn.story.49667957
afr0ck
peak 7 · 0 comments · 20% of case engagement
09-12 15:31amplified on hacker newshn.story.49673362
tamnd
peak 4 · 0 comments · 11% of case engagement
09-13 16:50amplified on hacker newshn.story.49685966
porridgeraisin
peak 2 · 0 comments · 6% of case engagement
10-08 16:11amplified on r/OpenAI 👑reddit.post.1x0v2oz
ItsAGarbageAccount
peak 6 · 12 comments · 28% of case engagement
10-24 07:08amplified on hacker newshn.story.50218929
frostbyte7
peak 2 · 0 comments · 6% of case engagement
1 more amplifiers in ainews.case_chain
09-11 17:21our radar first saw it · lag ?discovery anchor: hn.story.49661841—

Evidence (10) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnRapidly scaling online storage to serve over 1B ChatGPT usersmeetpateltech90
🟧 echo.blog ⭐The linked first-party engineering article is described as an account of rapidly scaling online storage to serve over one billion ChatGPT usOpenAI——
🟧 hnRapidly scaling online storage to serve over 1B ChatGPT usersafr0ck70
🟧 openaiRapidly scaling online storage to serve over 1 billion ChatGPT users
Retrieved article excerpt

Open article · Retrieved 2026-10-23T17:26:29.090616+00:00

September 11, 2026

[Engineering](https://openai.com/news/engineering/)

# Rapidly scaling online storage to serve over 1 billion ChatGPT users

How we adapted our application storage platform, Habitat, in Python to manage unprecedented growth.  
  
By Jon Lee, Chaomin Yu, and Ben Ries, Members of Technical Staff

Loading…

Share

Every OpenAI product depends on fast, reliable access to data, whether someone is logging in, checking their Codex settings, or starting a new conversation in ChatGPT. Each of those actions may require many separate data lookups before the product can respond. If those requests are slow, the product feels slow. If those requests fail, the product stops working entirely.

Habitat is the online storage platform we built so OpenAI products can quickly and reliably access needed information. Habitat now handles more than 70 million requests every second, supporting products used by over 1 billion people each week, across almost 40 geographic regions. Habitat first launched to support GPTs at DevDay 2023, starting as a simple Python client-side library connected to a single database. Today, it’s a complex distributed system that serves more than 500 petabytes of data.

Figure 01 · What is Habitat?

## Online storage platform

Habitat is the online storage platform we built so OpenAI products can quickly and reliably access needed information.

Play

- Request
- Response
- Changes (CDC)

Clients

Online storage platform

Storage resources

- ChatGPT
- API
- Codex
- Internal services
- And more

Habitat

- CachingCaches
- ACL policiesAuthorization
- Placement & data residencyData residency
- EncryptionData security
- IsolationMulti-tenancy
- Rate limitingRequest shaping
- RoutingSchema lookup · Data residency

- Azure Cosmos DBOnline storage
- NanobaseOnline storage
- ValkeyCaches
- Blob storageStorage resources

CDC ServicesChange Data Capture

- Databricks
- Rockset
- Kafka
- And more

Building and operating infrastructure at this scale is no easy feat, but also not particularly challenging. What made our situation unique is the unprecedented rate at which we’ve had to scale to support staggering user growth and product demand while simultaneously building out a mature platform. Often, system engineers build for 10x scale, and hope for it to hold for a few years while preparing for the next 10x. In our case, we've grown more than 10x year-over-year for the last three years. As a result, building and operating Habitat has been a series of tactical decisions and sequencing: understanding each component at the lowest level to squeeze as much juice out of our existing stack, while fending off storage and compute capacity crunches to buy time for foundational investments.

- 70M+

  requests per second
- 1B+

  people each week
- 500 PB+

  data

As OpenAI grew, Habitat had to grow with it: first by becoming reliable enough for mission-critical product traffic, then fast enough for global users, and finally, to deftly operate at massive scale. This post is the first in a two-part series on how we scaled online storage. In this post, we’ll share how Habitat evolved, why we turned it from a library into a service, and how we stretched a service written in an uncommon serving stack language—Python—into a reliable storage platform layer.

In a future post, we’ll go into detail about how we made multi-tenancy reliability at scale, our layered strategy for optimizing read performance, and how we scaled our partnership with Azure Cosmos DB to reliably handle unprecedented demand.

## What is Habitat?

Habitat started from a simple idea: product engineers shouldn’t need to think about database management. Habitat first launched to support GPTs at DevDay 2023 as a small Python library that interacted with ChatGPT’s main server. It supported a small set of operations that mapped under the hood to the database application, Azure Cosmos DB.

The library’s job was to give product teams a simple way to store and retrieve data without needing to master the underlying details. Habitat took care of the necessary work: figuring out what kind of data was involved, where it should come from (or go), whether the request was allowed, and so on.

Product engineers need not concern themselves with schema lookup, routing, authorization, encryption, serialization, request shaping, and connection pooling. They didn’t even need to consider where the data comes from: Azure Cosmos DB, caches, or other types of storage.

Figure 02 · Habitat service

## Simplified Habitat request flow

By decoupling the storage logic into a standalone service, we established a single point of control for deployments, observability, and platform enhancements.

Play

- Request
- Response

Client

OpenAI

Azure Cosmos DB

Habitat client sdk

envoy

- habitat-serviceprocess 1
- habitat-serviceprocess 2
- habitat-serviceprocess 3

habitat-envoy

- habitat-cosmos-db-us0
- habitat-cosmos-db-us1
- habitat-cosmos-db-eu0

This Python library worked well and Habitat saw rapid adoption among product engineers at OpenAI, despite no concerted central push away from using self-serve Postgres and Azure Cosmos DB.

As product needs evolved, it was even easy for product developers to add to the shared library support for features like client-side caching, compression, or encryption.

## Build a service to better support multiple, complex products

By the middle of 2025, Habitat had reached its limits as a client-side implementation. As the Habitat layer had grown more complex and OpenAI’s services count increased, backward-compatible protocol changes had become infeasible.

In one instance, we wanted to reduce the blast radius of any single region outage for our most critical data sets by migrating them to a set of regionally distributed Azure Cosmos DB accounts. Making this change required introducing extra routing logic into the client, disabled behind a feature flag, ensuring it rolled out to all clients, and then enabling the feature flag.

Coordinating deployments across dozens of services and working with each team to roll it out took days. Before enabling this, we realized we wanted to introduce some shadowing to ensure the sharding logic would be correct. That took another couple of days to roll out. A bug fix for something we realized was incorrect? Another couple of days. Eventually, we were ready to enable the flag, only for one of the teams to roll back their service for unrelated reasons to a previously buggy client, causing the outage we had worked so hard to avoid.

Changes to the client library necessitated complex coordination across dozens of services, a process that proved increasingly brittle, inefficient, and susceptible to operational failures. To reduce this operational fan out for our future deployments, we decided to pull Habitat into its own service.

By decoupling the storage logic into a standalone service, we established a single point of control for deployments, observability, and platform enhancements. Instead of managing fragmented updates, we could implement improvements centrally, providing immediate benefits to every OpenAI product.

A centralized service also gives us a single chokepoint to provide the strongest data security and privacy primitives. Habitat service is where we can centrally enforce access control policies, perform audit logging, and limit access to underlying storage resources like Azure Cosmos DB. Habitat plays a critical role in protecting user data and preventing unauthorized access from external, internal, and agent actors.

## Launching a Python service at scale

We knew we needed a service, but we didn’t want to migrate off Python quite yet, even with Python’s additional overhead as a service. Using Python for a high-throughput service increased network latency and added substantial CPU and memory scaling costs compared to local library execution. Moreover, we recognized that the inefficiencies of Python would not be acceptable at 100x scale, making an eventual rewrite almost certain.

However, we viewed this as a strategic incursion of technical debt. Our primary objective then was not cost or resource optimization, but rather unblocking product developers and achieving platform stability. By accepting the performance trade-offs of a Python service in the short term, we were able to prioritize more immediate challenges, establish our core APIs, and build out a robust infrastructure.

We also made a calculated wager that the rapid advancement of our own coding models would simplify the technical path in the future. We bet that by the time a full migration off Python was required, Codex and GPT would make that migration achievable. That bet eventually proved correct.

Running Habitat as a Python service would be suboptimal, performance-wise, but a necessary choice. Python lets us move quickly, but it doesn’t mean we could throw caution to the wind and accept meaningfully worse latencies. When the average user request results in hundreds of database calls, the slowest database call is the one the user feels. We’ve found the main challenge in running a Python service at this scale is in managing these tail latencies.

### Tracking the asyncio delay

Asyncio helps Python execute I/O-bound workloads concurrently, but does not help work around the Python GIL and provide CPU parallelism. In addition to I/O-heavy request proxying, Habitat handles many CPU-heavy responsibilities and background tasks: routing, compression, encryption, checksumming, downstream health checking, request shadowing, and hedging.

With so many CPU-heavy workloads and background tasks in our service, asyncio scheduling delay can easily dominate tail request latency. Before tuning for our initial service launch, we saw in traces for requests with p99 and higher latency that while downstream storage responded quickly, requests frequently stalled while waiting for the responsible coroutine to be rescheduled to parse the response.

Figure 03 · Tracking the asyncio delay

### Concurrency is not CPU parallelism

Python asyncio allows concurrent request processing, but only a single request executes on the CPU thread at a time. This has high impact on request latencies when there's a lot of CPU work to be done.

ReplayPause

CPU request/response processingPython network read/writeWait for Cosmos

#### Low CPU work

Brief Python steps; I/O waits overlap

#### High CPU work

Long Python steps keep ready responses waiting

Illustrative time0.0 / 40 illustrative units

For Python services at OpenAI, we find that in addition to measuring standard utilization and saturation metrics on memory, CPU, network, and disk usage, it is critical to also monitor the asyncio loop and how busy it is, then tune accordingly.

By periodically scheduling background tasks and recording the delta between expected and actual execution time, we are able to empirically measure event loop scheduling delay in real time. At high utilization, with many expensive tasks, even modest numbers of concurrent requests per process are enough to produce significant scheduling jitter, up to hundreds of milliseconds and in some edge cases several seconds.

As a result, we resort to keeping each process serving only a small number of concurrent requests and instead massively scale out the number of Python worker processes.

### Reducing a tail latency in our feature flag configurations

In our initial service launch, we discovered through live service CPU profiling one root cause of high asyncio delay (and resulting high tail latencies): periodic JSON parsing of our feature flag configurations via Statsig (a tool that manages feature flags, and can be used to run A/B tests and more).

By default, Statsig was configured to poll for refreshed configs every minute with no jitter, and the config included every production rule across every service. Elsewhere, an architectural decision was made to run up to 8 Python processes per pod to push higher 
OpenAI——
🟧 hnRapidly scaling online storage to serve over 1B ChatGPT userstamnd40
🟧 hnRapidly scaling online storage to serve over 1B ChatGPT usersporridgeraisin20
🟠 redditChat GPT 6 Has Lost Access To Saved Memories
OpenAI
ItsAGarbageAccount612
🟧 openaiRapidly scaling online storage to serve over 1 billion ChatGPT users (Part II)
Retrieved article excerpt

Open article · Retrieved 2026-10-23T16:26:41.758190+00:00

October 23, 2026

[Engineering](https://openai.com/news/engineering/)

# Rapidly scaling online storage to serve over 1 billion ChatGPT users (Part II)

How we optimized Azure Cosmos DB in our application storage platform, Habitat, to manage unprecedented growth.

By Jon Lee, Hrachya Hakobyan, and Chaomin Yu, Members of Technical Staff

Loading…

Share

All OpenAI products require fast, reliable access to data, provided by our storage platform, Habitat. It has to respond in milliseconds to over 1 billion users across 40 geographic regions. Our infrastructure faced an extraordinary challenge: supporting explosive growth and new use cases while continuing to improve reliability, performance, and product developer velocity. Solving that challenge required rethinking how our online storage platform was designed and operated. We constantly evaluated tradeoffs, following the pattern of: first become reliable enough for mission-critical product traffic, then fast enough for global users, and, finally, to deftly operate at massive scale.

This two-part series explains how we developed Habitat from a simple client library and database into a globally distributed storage platform serving over 500 petabytes of data. [Part I](https://openai.com/index/scaling-storage-one-billion-users-part-one/) focused on Habitat’s evolution from a Python client to a service. It also covered the techniques that allowed us to push a Python-based service far beyond what many would consider practical.

In this post, Part II, we walk through how we scaled the underlying storage component: Azure Cosmos DB. Through a close working partnership with the Azure team, we arrived at a viable multi-tenancy approach of co-managed containers, with excellent read performance at massive, global scale.

Figure 01 · What is Habitat?

## Online storage platform

Habitat is the online storage platform we built so OpenAI products can quickly and reliably access needed information.

Play

- Request
- Response
- Changes (CDC)

Clients

Online storage platform

Storage resources

- ChatGPT
- API
- Codex
- Internal services
- And more

Habitat

- CachingCaches
- ACL policiesAuthorization
- Placement & data residencyData residency
- EncryptionData security
- IsolationMulti-tenancy
- Rate limitingRequest shaping
- RoutingSchema lookup · Data residency

- Azure Cosmos DBOnline storage
- NanobaseOnline storage
- ValkeyCaches
- Blob storageStorage resources

CDC ServicesChange Data Capture

- Databricks
- Rockset
- Kafka
- And more

## Making multi-tenancy reliable at scale

As companies scale, infra teams often evolve from running single-tenant systems to multi-tenant ones. Single-tenancy, where every product surface team maintains their own system, reduces blast radius and provides easy ownership boundaries and workload isolation. As teams and product surfaces grow, this becomes expensive to run. Single-tenancy makes every product team responsible for capacity planning and often results in significant over-provisioning.

Conversely, multi-tenancy assigns control to a centralized database team, with better knowledge and experience for provisioning resources. But multi-tenancy creates its own problems, such as noisy-neighbor issues, where one tenant consumes an unusually large share of the resources to the detriment of the other tenants.

In Habitat, we had to weigh all these tradeoffs to design a reliable, efficient, storage system at scale. Today, Habitat is a multi-tenant database layer for many OpenAI products, but we went through a circular journey from using one multi-tenant Azure Cosmos DB container to provisioning single-tenant backing containers to reverting to a multi-tenant container by default. We’re still very early in our multi-tenancy story on Habitat: we support a large set of use cases, but we’ve been able to defer investment in this area by leveraging Azure Cosmos DB’s built-in primitives wherever possible.

## A simplified primer on Azure Cosmos DB containers

Before walking through our Azure Cosmos DB journey, some basic context:

- An Azure Cosmos DB account defines a set of containers and a replication policy
- Each container is provisioned for a certain amount of throughput in request units per second (RU/s)
- Data within each container is stored in a typical shard-by-specified-logical-partition-key manner with documented limits on storage and throughput per logical partition key
- Azure Cosmos DB handles sharding logical partition keys across fewer backing physical partitions, splitting them into multiple physical partitions when storage exceeds a threshold or when the container requires more physical partitions to sustain the provisioned throughput

## Phase I: Relying on Azure Cosmos DB primitives

We originally allowed any client load through, relying on the stated 10K RU/s limit per logical partition key to provide back pressure. When we first set out, we also used only one default Azure Cosmos DB container in each account. This worked well enough, but proved problematic for a few reasons:

### Logical partition key limits

Due to early API choices, we exposed logical partition key selection directly to clients. As a result, we have frequent collisions on commonly used partition keys, such as `user_id` or `workspace_id`, across different product use cases. Because these use cases shared Azure Cosmos DB limits on the same logical partition keys, the design constrained overall throughput for a given user.

One common problem we faced in scaling Postgres before we moved to Habitat and Azure Cosmos DB was the ability for many requests from a very hot organization or hot key—one tenant generating a disproportionately high load—to take out the whole database. Significant collective effort was spent to cache those keys and build leases into cache misses so that the resulting cache miss load does not stomp on the underlying database.

Figure 02a · Logical partition key limits

## Different clients, the same partition key

Play

Cosmos DB containerPhysical partitionPK: user-id-28104CapacityMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedMemory / dreaming : capacity usedConversationsSuccess rateResponses returned in this animation loop—AuthSuccess rateResponses returned in this animation loop—Memory / dreamingSuccess rateResponses returned in this animation loop—

### Noisy neighbors

While documented data size and throughput limits apply to logical partition keys, the physical partition is actually where limits are enforced. In practice, this means logical partitions are unable to reach 10,000 RU/s. Instead, they share the physical partition’s limits with every other logical partition key colocated on that physical partition.

This allowed noisy neighbors to impact many unrelated logical partition keys, with workloads operating on data for niche product features disrupting core login and signup flows.

Figure 02b · Noisy neighbors

## Different users, the same physical partition

Play

Cosmos DB containerPhysical partitionPKs: user-id-28104, user-id-10384Conversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversations user-id-28104: capacity usedConversationsuser-id-28104Success rateResponses returned in this animation loop—Conversationsuser-id-10384Success rateResponses returned in this animation loop—

### Weak partitions

The throughput limit for a given physical partition is also variable, dependent on the total throughput assigned to the Azure Cosmos DB container. The container’s provisioned throughput is distributed roughly evenly across the physical partitions for that container.

As data volume grows, physical partitions split, increasing the total partition count while total provisioned throughput remains unchanged. The result is that the effective throughput limit per partition shrinks as data size grows.

For our most storage-heavy, blob-like use cases, this creates a failure mode where storage growth alone reduces throughput capacity for active workloads even while request rates and usage remain stable.

Figure 02C · Weak partitions

## The limit falls below demand

A partition splits when it reaches its storage limit. Each child receives half the throughput capacity.

Before split: 10K RU/s capacity

After split: 5K RU/s capacity × 2 partitions

RU/s05K6K10K200200429

## Phase II: Trying workload isolation and single-tenancy

Separate containers help partially solve these partition key limits and noisy neighbors. By using separate containers, each can be assigned its own independent physical partitions and only the varying workloads on that container itself could be noisy neighbors or overlap in partition key space. On the downside, there is non-zero overhead in provisioning new containers—each container requires individualized capacity planning—so we want to create containers only at a service or use case boundary that makes sense.

We began to use separate Azure Cosmos DB containers for the most critical new use cases requiring strong isolation. Combined with a script for managing weak partitions by synchronizing the total throughput provisioned for each container with its number of physical partitions, we mostly avoided all the problems we were facing.

However, since we started with a default container, many legacy critical use cases were unfortunately stuck there without a data migration. To protect critical services that still relied on data in the shared default container, we often advised teams to create separate containers for new services or major product features. As we scaled, pressure on the default container grew and production incidents also grew. We began to provision containers for any new service or large product feature just to protect the default container from more load.

This saved us from many site-wide outages, limiting the blast radius to feature or service degradation outages. However, the overhead of provisioning new containers eventually caught up to us:

### Lack of stable aggregate growth

In the old shared default container, any particular new use case going from 0 QPS to 1 million QPS was unlikely to significantly shift the total aggregate usage. On an isolated container however, a new use case going from 0 to 1 million QPS might represent 1,000x more load than the baseline attributed to only internal dogfooding.

With dedicated containers, teams now needed to remember to pre-provision containers to the expected level of throughput for their launches. Product teams would often ship their features to production and forget to pre-scale and we’d sit in SEV rooms on launch day attempting to scale up containers last minute.

This is a core workload mixing benefit of multi-tenant systems that we lose in favor of better isolation with this container strategy.

Figure 03 · Lack of stable aggregate growth

## The same workload, different headroom

1K RU/s during load testing → 1M RU/s at launch

### Shared container

100M RU/s capacity · 80% utilized

#### Load test

1K20M=

0.005%

of headroom

#### Launch

1M20M=

5%

of headroom

### New dedicated container

10K RU/s capacity · no other workloads

#### Load test

1K10K=

10%

of headroom

#### Launch

1M10K=

10,000%

of headroom

### Capacity planning

Over time, monitoring usage of dedicated containers also required intimate product knowledge of when traffic would shift or grow.

We can provide a basic control plane script to scale up the provisioned thro
OpenAI——
🟧 hnRapidly scaling online storage to serve over 1B ChatGPT users (Part II)frostbyte720
🟠 redditHow OpenAI scaled its storage layer to serve over 1 billion ChatGPT users, part II
ChatGPT
rhiever21

Interpretation history

Decision trace