Back to Flash News

OpenAI Rewrites Habitat in Rust with Two Engineers

OpenAI has unveiled Habitat, the online storage platform behind ChatGPT: processing over 70 million requests per second, storing over 500PB of data, serving over 1 billion users weekly, and covering nearly 40 geographical regions. The system was initially developed as a Python client library for GPTs during the 2023 Developer Day, connecting to a single database, with Python still supporting over 20 million requests per second during peak times.

The company acknowledged early on that Python could not sustain the ultimate scale and knew a rewrite was necessary, but chose to expand the product first. The rewrite was delayed by about a year to focus engineering efforts on more urgent issues during a hyper-growth period. Habitat later became the second-largest internal service by core count. In Q2 2026, two engineers, along with Codex and GPT-5.5, rewrote the entire service in Rust. The new version now handles 95% of production traffic, with CPU efficiency improved by about 6 times, memory efficiency increased by about 15 times, and both average and tail latency reduced, while the Python implementation is set to be deprecated in a few weeks.

The underlying system still connects to Azure Cosmos DB; complex queries are synchronized to the analytics layer via change data capture. The official documentation will continue to address storage layer expansion, multi-tenant reliability, and read performance. Boundary conditions are written as: monitoring, testing, and service boundaries must be clear enough to entrust migration to the model. Without these, a rewrite could turn into an accident. Codex also revealed a defect where local logs wrote approximately 640TB annually to SSDs, which has been fixed, indicating that writing code and writing logs are two sides of the same coin.

The creditors of this technical debt have shifted from "future overtime engineers" to "stronger next-generation models." Choosing the wrong language no longer automatically equates to expensive manual migration, provided that traffic paths, testing, and rollbacks are still designed by humans. OpenAI has written this bet into production storage rather than demonstration repositories.

In market mechanisms, this is an internal efficiency event that spills over into coding agent pricing. The buyers are platform teams looking to migrate existing Python services; the sellers are OpenAI, which has embedded the rewrite costs into Codex subscriptions. Beneficiaries are large-scale systems with clear interfaces and observability; those under pressure are startup codebases that want models to migrate architectures without a test network, as well as outsourcing firms selling migration projects by person-month. Funding has shifted from hiring rewrite teams to tokens and two engineers capable of writing constraints. The public blog itself serves as a living advertisement for Codex enterprise orders.

Source: Public Information

ABAB AI Insight

Habitat's growth from a single-database Python client to 500PB indicates OpenAI's acceptance of the "wrong language first, then switch" balance sheet. The one-year delay was not ignorance but a sale of migration options to the yet-to-arrive GPT-5.5. Two people plus the model completing the core path proves that the bottleneck has shifted from typing volume to specifications, testing, and traffic switching. The 6x CPU and 15x memory improvements are physical bills, while the 95% traffic represents risk bills: the remaining 5% is what humans have yet to dare entrust to the model.

The capital path is replacing engineer headcount with inference tokens. During hyper-growth, the opportunity cost for each storage engineer is product availability; tying them to the rewrite risks missing the user curve. Once Codex can handle the entire warehouse, the marginal cost of migration will decrease, clearing the Python debt in one go. The motivation is to prove that their coding agent deserves to be in production storage, not just writing plugins. Resources have shifted from language wars to observability stacks: without metrics, the model won't know when the migration is complete.

Similar structures include Facebook using PHP until HHVM and Twitter migrating from Ruby. The difference is that previously, migration required a platform department, while the current official number is two people. Bun uses dozens of agents to migrate the runtime from Zig to Rust, representing an external version of the same type of experiment. The industry phase belongs to control: systems that can be rewritten are those with clear boundaries; unclear boundary systems will only lead the model to write debts more chaotically.

Structural judgment is a technical substitution. The mechanism is that the price of code migration decreases with each generation of models, allowing companies to be bolder in choosing the fastest language from day one. The debt hasn't disappeared; the creditors have changed to model suppliers. Whoever controls testing and traffic switches still holds the final veto power of humans. Random writing will still lead to accidents, but those accidents will come faster.

ABAB News · Cognitive Laws

  1. Technical debt can wait for the next generation of models to repay, provided the billing items are clear.

  2. Two people can rewrite storage because monitoring existed earlier than the language.

  3. When migration becomes cheaper, there will be more willingness to choose the wrong language on the first day.