OpenAI has revealed new details about one of its largest internal programming migrations, showing how the company moved its Habitat online storage service from Python to Rust as its infrastructure continued scaling rapidly.
The engineering team says Habitat now handles more than 70 million requests every second, supports products used by more than 1 billion people each week and serves data across almost 40 geographic regions. The platform also manages more than 500 petabytes of data.
From a Small Python Library to Massive Infrastructure
Habitat did not begin as a massive distributed platform. OpenAI originally introduced it as a small Python client library during DevDay 2023 to make it easier for product teams to store and retrieve application data without directly managing database operations.
Over time, the system evolved into a centralized online storage platform used across OpenAI products and internal services. Its responsibilities expanded to include routing, authorization, encryption, caching, data residency, rate limiting and other infrastructure functions.
OpenAI says the service eventually became one of its largest infrastructure components by core count. At its peak, the Python implementation was serving more than 20 million requests per second.
Why OpenAI Moved the Service to Rust
Python allowed the team to move quickly and scale Habitat significantly, but OpenAI eventually reached a point where efficiency became increasingly important. The company says continued growth made it necessary to improve the underlying service's CPU and memory efficiency.
Rather than redesigning only individual components, the team decided to rewrite the entire service in Rust.
Rust is designed for high-performance systems programming while providing compile-time memory-safety guarantees. That combination has made the language increasingly attractive for infrastructure where predictable performance and resource efficiency are important.
Two Engineers and AI Coding Tools
One of the most notable parts of OpenAI's disclosure is how the migration was completed. The company says that during the second quarter of 2026, two engineers used Codex and GPT-5.5 to rewrite the entire Habitat service in Rust.
OpenAI says the resulting Rust implementation is now handling 95 percent of production requests, while the remaining Python implementation is scheduled for deprecation.
The project is an important example of how AI coding tools are being used inside large engineering organizations. Instead of treating AI as a replacement for software architecture and engineering judgment, the migration demonstrates a workflow in which engineers use coding agents to accelerate a large-scale systems rewrite.
Large Efficiency Gains
According to OpenAI's engineering measurements, the Rust implementation is six times more CPU efficient and 15 times more memory efficient than the previous Python version.
The company also reports improvements in average and tail latency. These changes matter particularly for a platform operating at tens of millions of requests per second, where relatively small efficiency improvements can have a significant effect on infrastructure capacity and operating costs.
OpenAI has not presented the migration as a simple claim that Rust is universally faster than Python. Habitat's architecture and constrained API were also important factors in making the system scalable.
Why Habitat Uses a Constrained API
OpenAI says one reason it was able to push the Python implementation so far was the deliberately limited design of Habitat's API.
Instead of allowing clients to construct arbitrary database queries, Habitat exposes a simpler NoSQL-style interface designed around predictable workloads. The objective is to keep request costs relatively constant and avoid unpredictable database operations that could create latency spikes or excessive resource consumption.
This approach reflects a broader principle in distributed-systems engineering: controlling the amount of work that a single request can generate can make a system easier to scale and operate reliably.
Rust Takes Over the Critical Path
The migration is significant because Habitat sits directly on the critical path for OpenAI products. The service provides access to information required for actions such as account operations, Codex settings and ChatGPT conversations.
OpenAI describes Habitat as a central layer between product clients and multiple storage systems, including Azure Cosmos DB, caches and other storage resources.
By moving this layer to Rust, the company is effectively applying a systems-programming language to one of the infrastructure components responsible for serving extremely high request volumes.
What This Means for Developers
The project offers a practical case study for developers evaluating Python and Rust for backend infrastructure.
Python remains widely used for application development, automation, data science and AI workloads. Rust, meanwhile, can become attractive when CPU utilization, memory consumption, latency and predictable resource usage become critical constraints.
The Habitat migration also demonstrates that moving a large production system between languages is not simply a compiler exercise. API design, workload characteristics, observability, rollout strategy, database behavior and operational reliability all influence whether a rewrite produces meaningful benefits.
AI-Assisted Rewriting Could Change Software Migration
The most forward-looking aspect of the project may be the combination of experienced engineers and AI coding systems.
Large language models can generate, translate and refactor substantial amounts of source code, but production migrations still require engineers to define architecture, validate behavior, investigate performance regressions and control deployment risk.
OpenAI's Habitat project therefore provides an unusually large real-world example of AI-assisted software development being applied to systems infrastructure rather than only small code-generation tasks.
Rust's Growing Role in Infrastructure
The Habitat migration arrives as Rust continues expanding beyond application development into operating systems, cloud infrastructure, networking, databases and AI systems.
The language's combination of native performance and compile-time safety makes it particularly relevant to components where memory errors, resource consumption and latency can become expensive operational problems.
OpenAI's own infrastructure work adds another high-profile example of Rust being used to address those constraints at large scale.
The Bigger Programming Story
The important lesson from Habitat is not that every Python service should be rewritten in Rust. Instead, the project demonstrates how language selection can change as an application moves from rapid development toward extreme infrastructure scale.
OpenAI was able to push the Python implementation to tens of millions of requests per second, but eventually decided that the service needed greater resource efficiency. The resulting Rust migration shows how programming-language choices can evolve alongside the operational requirements of a distributed system.
For developers building high-throughput services, the project provides a detailed example of where Python can scale, where a systems language can provide additional efficiency, and how AI coding tools can participate in a large production rewrite.

