---
title: "Rapidly scaling online storage to serve over 1 billion ChatGPT users"
description: "Habitat, OpenAI's online storage platform, grew from a client-side Python library over Azure Cosmos DB into a centralized Python service handling 70M+ requests per second and 500+ PB across about 40 regions."
url: "https://swe.quest/articles/rapidly-scaling-online-storage-to-serve-over-1-billion-chatgpt-users-05665dfd2bff721d"
canonical: "https://openai.com/index/scaling-storage-one-billion-users-part-one"
source: "OpenAI"
published: "2026-09-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["scalability","python","concurrency","performance","resilience"]
---

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

A post on [OpenAI](https://swe.quest/sources/openai.md), published 2026-09-11, 14 min read, Case study. Original: [https://openai.com/index/scaling-storage-one-billion-users-part-one](https://openai.com/index/scaling-storage-one-billion-users-part-one)

## Summary

Habitat, OpenAI's online storage platform, grew from a client-side Python library over Azure Cosmos DB into a centralized Python service handling 70M+ requests per second and 500+ PB across about 40 regions. It moved to a service because coordinating client-library rollouts across dozens of services had become slow and error-prone. Running Python at this scale meant fighting tail latency from asyncio event-loop scheduling delay, which the team measured directly and controlled by keeping per-process concurrency low and scaling out worker processes. Specific fixes included shrinking and jittering Statsig feature-flag config refreshes, and switching aiohttp's LIFO connection reuse to FIFO to break a metastable failure that concentrated load on already-slow processes.

Written by swe.quest, not by the author.

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

## Topics

- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)

## Prerequisites

- Python asyncio ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- connection pooling
- tail latency ([easy posts on Performance engineering](https://swe.quest/tags/performance.md?difficulty=easy))

## Keywords

Habitat, Azure Cosmos DB, asyncio, aiohttp, Statsig, Envoy, Istio, ChatGPT

## Related posts

- [Rapidly scaling online storage to serve over 1 billion ChatGPT users (Part II)](https://swe.quest/articles/rapidly-scaling-online-storage-to-serve-over-1-billion-chatgpt-users-part-ii-1fe17c5ac1f7349f.md): OpenAI · 2026-10-23 · Medium · 18 min read · Multi-tenancy, Distributed databases, Scaling, Capacity planning, Cloud platforms
  OpenAI's Habitat storage platform went from one shared Azure Cosmos DB container, to per-use-case dedicated containers, and back to a shared multi-tenant container.
- [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.
- [Scaling recommendations service at OLX](https://swe.quest/articles/scaling-recommendations-service-at-olx-d55314cae80c839b.md): OLX Tech · 2025-07-08 · Medium · 10 min read · Python, Performance engineering, Concurrency, Memory management, Recommendations & ranking
  OLX scaled a Python FastAPI recommendations service to tens of thousands of requests per second with p99 latency under 10ms by systematically removing event-loop stalls.
- [How Meta built the infrastructure for Threads](https://swe.quest/articles/how-meta-built-the-infrastructure-for-threads-961a6b509998fe97.md): Meta Engineering · 2023-12-19 · Medium · 7 min read · Scaling, Distributed databases, Multi-tenancy, Serverless, Resilience
  Threads reached 100 million sign-ups in five days on existing shared Meta infrastructure rather than purpose-built systems, illustrated through two components: ZippyDB and Async.
- [Beyond rate limits: scaling access to Codex and Sora](https://swe.quest/articles/beyond-rate-limits-scaling-access-to-codex-and-sora-f19f4998580ba788.md): OpenAI · 2026-02-13 · Medium · 6 min read · Payments & fintech, System design, Consistency models, Event-driven architecture, Distributed systems
  OpenAI replaced hard rate-limit stops for Codex and Sora with a real-time access engine that treats rate limits, free tiers, credits, promotions and enterprise entitlements as layers in a single decision waterfall evaluated per request.

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)
