How big OpenAI’s Spark is matters less than the chain of questions a lakehouse engineer would ask: what data OpenAI actually has, what each kind needs, which technology each kind got, where Spark stands among them, what jobs it runs, and why that layer is Spark rather than a pile of scripts or some database.
The starting point was a Greptime blog post about one piece of the platform, its Spark observability.1 To answer the wider questions I gathered what OpenAI’s engineers have said and written in public over the last two years: three Spark talks, one from October 2025 and two from Community Over Code Glasgow in October 2026; four OpenAI engineering posts on the data agent, PostgreSQL and the Habitat online store; the Kafka and Flink talks from Current 2025 as others summarised them; customer stories from Databricks and ClickHouse; two interviews with Emma Tang, who leads OpenAI’s data platform; a job description; and the GPT-3 paper. Every document is a footnote, anything unattributed is my own reading and says so, and I use the vendor-written stories only where OpenAI’s own people say the same thing.
The short answers
Where does the data come from? Mostly from the products. ChatGPT has more than a billion weekly users, and every conversation creates online state, product events, service logs and audit records; the API, Codex and the enterprise products add their own. The online store holds more than 500 PB, the lakehouse held 1.5 EB in 90,000 datasets in May 2026, and logs arrive at petabytes a day.234 Training corpora are a separate line that the public material does not place inside the data platform.
What is Spark’s role, and what does it run? It is the default compute layer for offline data. Online sits Kafka and Flink; offline sits Spark, Trino and Airflow, and there “Spark is a very important part of the architecture” (2:35).5 It turns the raw tables that streams and change data capture (CDC) land in the lake into the tables everyone downstream uses. Six kinds of job can be checked against the sources: scheduled ETL, CDC merges, ad hoc queries, feature backfills, post-training data and the platform’s own work.
Would scripts or a database not do? Each does, inside its own limits, and OpenAI’s offline data is outside all of them at once: tables too big for one machine, a DAG of hundreds of thousands of dependent jobs, and thousands of users sharing sensitive data under one set of permissions. Scripts survive as the logic inside PySpark jobs, and databases serve the products and the logs. OpenAI’s PostgreSQL post is blunt: no new tables on the main cluster, and a 12-table join once caused serious incidents.6
Why Spark and not another engine? The lakehouse grew up around Databricks, so the table format is Delta, the catalog is Unity Catalog, and Spark came with them; Chao Sun said they used Delta because “Databricks only supported Delta” at the time (5:48).5 Spark also fits a Python organisation, runs the same code managed or self-run for jobs that cannot go to a third party, works in both clouds, and is open source for a team of Apache committers. The real engineering effort goes into keeping that default standing while demand grows tenfold a year.
Eight kinds of data
Sorting the data by access pattern is more useful than sorting it by product, because latency, read and write mix, join complexity and scale decide the engine. The public material describes eight kinds.
| Kind of data | Access pattern | Where it lives or runs | Spark’s part |
|---|---|---|---|
| Online product state | point reads by key in milliseconds | Habitat on Cosmos DB, PostgreSQL; a Rockset replica for complex reads | none directly; exported by CDC |
| Event streams | append, fan-out, seconds | Kafka, PyFlink | lands them as tables (Structured Streaming) |
| Lakehouse analytics | multi-step transforms, large joins, shared by thousands | Delta tables, Unity Catalog | the main engine |
| Logs | append only, recent data, answers in seconds | ClickHouse | none |
| Pretraining corpora | filtering and deduplication at web scale | not public; Spark MinHashLSH in 2020 | unknown today |
| Post-training data | PII scrubbing, very wide rows | the lakehouse | the transforms |
| Security and audit | streaming normalisation, joins, long retention | Delta tables | yes |
| Experiments and features | batch plus stream, backfills | Chronon, Kafka | batch features and backfills |
What never reaches Spark
Logging in, opening a conversation or reading Codex settings is a point read on the online store. That store is Habitat. It launched with GPTs in November 2023 as a Python client library, and it is now a distributed system serving about 40 regions, 70 million requests a second and more than 500 PB, built on Azure Cosmos DB; its largest single Cosmos account holds tens of petabytes and serves more than 20 million QPS.27 The older core data is on PostgreSQL: one primary and nearly 50 read replicas across regions, serving millions of queries a second.6
Spark has nothing to do with serving this data. The two posts matter to it because both keep complex queries out of the online stores: PostgreSQL accepts no new tables, and Habitat gives teams that need complex queries a Rockset replica, kept current by CDC, to “isolate” the online store from analytics.7 Online data that has to take part in large-scale statistics is exported to the offline side, the pipeline “from online storage to offline” that Chao Sun describes.
Kafka is the event backbone, carrying logs, training data and experiment results. Stream processing is PyFlink, because almost everyone writes Python, on the Flink Kubernetes Operator. So that teams need not manage offsets, retries and dead-letter queues, OpenAI built a Kafka Forwarder on Uber’s uForwarder that turns pull-based consumption into gRPC pushes, with dead letters landing in Databricks.8 The Kafka figures that circulate come secondhand, from Confluent-side write-ups of the Current 2025 talks by people who do not work at OpenAI: more than 30 clusters, twenty times the throughput in a year and five nines of availability; Emma Tang told the Pragmatic Engineer in October 2025 that the main Kafka footprint went from one cluster to five.89 Kafka’s relation to Spark is upstream: events end up as lakehouse tables, and on the way in Flink and Spark Structured Streaming work side by side (6:49).510
Service logs stay out too. OpenAI writes petabytes of logs a day, growing more than 20% a month, from Fluent Bit into a ClickHouse cluster of 90 shards with two replicas each; about 80% of queries touch only the last two days, so those stay on local disk and older data goes to blob storage.4 Logs are append only, queries cluster on recent data, and an incident needs answers in seconds, which suits an OLAP database; Spark spends seconds just starting a job.
The lakehouse
This is Spark’s home ground, and its size moves fast. OpenAI’s data agent post of 29 January 2026 gives more than 600 PB, 70,000 datasets and more than 3,500 internal users.11 ByteByteGo’s account of the same agent, published on 3 June 2026 with Emma Tang’s figures as of May, gives 1.5 EB, 90,000 datasets and about 4,000 users, and later in the same article 5,500 users.3 In the October 2025 interview Tang said compute demand on this layer had grown tenfold each year for two years.9
The lakehouse holds what arrives from the products, the online stores and the event streams, and the tables built on top of them. The Databricks customer story lists the uses: ChatGPT telemetry, API analytics, security monitoring and internal decision support, for product analytics, finance, security, and trust and safety, with workloads from abuse detection and privacy-sensitive analytics to company-wide dashboards. The marketing team rebuilt its data foundation in Bronze, Silver and Gold layers and cut $400,000 a month in storage.12 Those words are Databricks’, but they match the internal customers Chao Sun names: research acceleration, analytics, data science, safety and integrity, finance and ChatGPT Enterprise (1:27).5
Governance is the hidden centre of this layer. Tang describes the lake as unified, with no duplicate technologies; every table is produced by code in one monorepo and tagged with an owner, an importance level and how fresh it should be.3 That let the data agent stay simple and reliable, and let the team move 90,000 tables, 600 PB and hundreds of thousands of jobs to a second cloud in two months, with Codex writing the pull requests. My reading is that this tagging work, more than any engine choice, made the rest of the platform possible.
Training data at both ends
OpenAI’s help centre says foundation models are trained on three sources: information publicly available on the internet (crawled by GPTBot, which sites can refuse in robots.txt), data from partners, and data that users, human trainers and researchers provide or generate. The processing includes excluding sources that aggregate personal information, filtering to reduce personal information, and removing duplicates.13
The public material has one hard fact about the engine, and it is old. The GPT-3 paper of 2020 says, in its first appendix, that the team fuzzily deduplicated documents within and across datasets with Spark’s MinHashLSH implementation, using ten hashes.14 So OpenAI’s researchers processed corpora with Spark before ChatGPT existed, but that does not show that today’s pretraining pipeline is built on Spark. The other quote often repeated is Greg Brockman’s at Ray Summit 2022, that OpenAI trains its largest models with Ray; that is about scheduling distributed training, not the data platform.15 My reading is that the research organisation runs pretraining data pipelines itself, outside what the data platform team talks about, which would explain why every Spark talk discusses product data.
The other end is the bridge from product data back to training. Tang’s platform includes a team found only at OpenAI, the Flywheel team, which scrubs production data, removes all personally identifiable information (PII) and prepares training data.9 Chao Sun describes the same path from the other side: one of the platform’s most important customers is research acceleration, data has to flow from product to offline to research, conversations among it, through the whole platform and its transformations (1:27), and “some of the data goes into research for post-training” (7:11).5 User settings decide which conversations can be used: a user can turn off the setting that lets conversations improve the models, and deleted conversations are normally removed from OpenAI’s systems within 30 days.1316
This data asks more of an engine than an ordinary warehouse does. PII scrubbing, opt-outs and deletion all have to be traceable, the main reason OpenAI runs its own Spark beside the managed one. And rows are wide. Tang said the team hit Spark’s DataFrame row size limit when storing long conversations, and multimodal features bring voice, images and PDFs into the same tables.9 My reading is that this is one of the biggest differences between an AI company’s lakehouse and an internet company’s: a row grows from a few hundred bytes of event to hundreds of kilobytes of conversation or binary, and Parquet row groups and Spark’s memory settings have to be tuned again.
Security, experiments and features
OpenAI’s security team normalises audit logs from its clouds, infrastructure and vendors with streaming pipelines into governed Delta tables, used for threat detection, investigation, audit analysis and incident response, and Codex can query them through a SQL interface.12 Security data has to be joined with identities and assets and kept for years, so it goes to Delta, while logs that need fast search go to ClickHouse.
A/B testing is routine, and Chao Sun lists experiments as one reason data must flow from product to offline. OpenAI announced its acquisition of the experimentation platform Statsig on 2 September 2025.17 On 5 May 2026 Amplitude announced that it was taking over the Statsig product, brand and customers, while the Statsig team stayed at OpenAI.18 What internal experiment analysis runs on now is not public. Training-run metrics live elsewhere again, in Neptune, acquired in December 2025.19
On features, the platform’s ML infrastructure serves non-LLM product features and recommendation services through Chronon, the feature platform Airbnb open-sourced.9 Chronon’s offline computation and historical backfills are Spark jobs, and its streaming side reads Kafka.20 Feature backfills are one of the uses of Spark at OpenAI that the talks rarely mention.
Two numbers that do not add up
Habitat’s 500 PB and the lakehouse’s 1.5 EB cannot be added: the lakehouse already holds exported copies of online data, and no source says whether 1.5 EB counts both clouds’ copies. The lakehouse went from 600 PB in January 2026 to 1.5 EB in May, about four months apart, which suggests that part of the jump is a change in what was counted, even though the direction matches tenfold a year.
| Date | What became public |
|---|---|
| 23 Aug 2022 | Greg Brockman at Ray Summit: OpenAI trains its largest models with Ray15 |
| Nov 2023 | Habitat launches with GPTs, as a Python client library2 |
| 2024 | Databricks in use on Azure and AWS; OpenAI acquires Rockset1221 |
| 9 Jun 2025 | Kai Waehner summarises OpenAI’s Kafka and Flink talks at Current 2025 London8 |
| 30 Jun 2025 | ClickHouse: petabytes of logs a day, 90 shards4 |
| 2 Sep 2025 | OpenAI announces the Statsig acquisition17 |
| 23 Oct 2025 | Chao Sun, Scaling Apache Spark at OpenAI: Databricks and OpenSpark5 |
| 28 Oct 2025 | Emma Tang to the Pragmatic Engineer: tenfold a year, Flywheel, row size limits9 |
| Dec 2025 | OpenAI acquires Neptune19 |
| 22 Jan 2026 | Scaling PostgreSQL: one primary, nearly 50 replicas, no new tables6 |
| 29 Jan 2026 | The in-house data agent: 600 PB, 70,000 datasets, 3,500 users11 |
| 5 May 2026 | Amplitude takes over the Statsig product, brand and customers18 |
| 3 Jun 2026 | ByteByteGo, with May figures: 1.5 EB, 90,000 datasets3 |
| 11 Sep 2026 | Habitat, part I: 500 PB, 70 million requests a second2 |
| 23 Oct 2026 | Habitat, part II7 |
| Oct 2026 | Two Spark talks at Community Over Code Glasgow, uploaded on 30 October2223 |
| 4 Nov 2026 | Greptime on OpenAI’s move to GreptimeDB1 |
Where Spark sits in the flow
Put the eight kinds into one flow and Spark’s place is clear. Questions that can be answered quickly never enter Spark: point reads go to Cosmos DB and PostgreSQL, log search to ClickHouse, complex reads of online data to Rockset. Data that needs large joins, several steps of transformation and sharing with thousands of people passes through it.
flowchart LR
P["Products: ChatGPT, API, Codex"] --> O["Online stores: Habitat on Cosmos DB, PostgreSQL"]
P --> K["Kafka event streams"]
P --> L["Service logs via Fluent Bit"]
L --> CH["ClickHouse: log search"]
O -->|"CDC"| RS["Rockset replica: complex reads"]
O -->|"CDC and exports"| ING["Ingestion: Spark Structured Streaming and Flink"]
K --> ING
K --> FL["PyFlink: training and experiment data"]
ING --> LH[("Lakehouse: Delta tables on S3 and Azure Blob, Unity Catalog")]
LH <-->|"batch ETL, scheduled by Airflow"| SP["Spark"]
LH --> TR["Trino and Databricks SQL: short queries"]
LH --> C1["Analytics, finance, safety"]
LH --> C2["Chronon features"]
LH --> C3["Post-training data"]
LH --> C4["Data agent and dashboards"]Chao Sun describes the offline pipeline this way (6:40): Airflow orchestrates it; ingestion uses both Spark Structured Streaming and Flink; Structured Streaming merges various kinds of CDC data into downstream tables and leans heavily on Delta Lake’s deletion vectors; and part of the data flows on to research for post-training.5 The “data pipelines” product the platform offers its users is exactly this movement: from Kafka to offline, from online storage to offline, and from offline back to online (3:03).
Why deletion vectors? Changes from an online database are frequent updates and deletes, and if every MERGE rewrote whole Parquet files (copy-on-write) the write amplification would be severe. A deletion vector records only which rows are no longer valid and defers the rewrite to compaction, Delta’s standard answer to frequent upserts. The same path carries deletions downstream: a conversation the user deletes has to leave OpenAI’s systems within 30 days, so the delete travels from the online store through CDC into the lake. My reading is that propagating deletions is a class of Spark job in its own right, although no source describes how OpenAI implements it.
Two Sparks, six kinds of job
OpenAI’s Spark is two systems. In October 2025 Chao Sun put it this way (4:20): there is Databricks Spark, and there is OpenAI’s own Spark, called OpenSpark; roughly, all user jobs run on Databricks, and the jobs the platform team manages, such as ingestion and monitoring, run on OpenSpark. The two share one catalog.5
He gave three reasons for running a Spark of their own (7:44). Some jobs have a different set of security and privacy requirements and “cannot run in a third-party vendor”. Owning the source allows heavy customisation and makes maintenance easier. And it is much cheaper.
flowchart TB
U["User jobs: scheduled ETL, SQL warehouses, notebooks"] --> DB["Databricks Spark, managed, on Azure and AWS"]
PJ["Platform jobs: ingestion, monitoring, privacy-sensitive work"] --> OS["OpenSpark, self-run on Kubernetes"]
DB --> UC["Unity Catalog"]
OS -->|"DSv2 plugin, per-query scoped tokens"| UC
TR["Trino"] -->|"same plugin approach"| UC
UC --> D[("Delta tables on S3 and Azure Blob")]The Databricks side is no minor partner. Databricks calls OpenAI one of its largest deployments, says that because OpenAI’s teams are small for their scale its engineers work “as an extension” of the data platform team, and says features such as Photon, smart caching and storage tuning were shaped partly by OpenAI’s workloads.12 That is the vendor speaking, but it matches what Chao Sun and Emma Tang say.
The balance between the two tracks is shifting. By the Glasgow talks of October 2026 the self-run side was running hundreds of thousands of Spark applications a day on about 40 Kubernetes clusters in two clouds, and the speakers said that most user jobs are now written by AI. A year earlier Chao Sun had listed dynamic scaling and Celeborn for shuffle as future work; a year later both were in production.22 My reading is that the self-run share is growing quickly, but no source gives the ratio, and nothing shows the Databricks side shrinking.
Chao Sun groups Spark’s uses into three (5:00): scheduled ETL that reads from online stores or other tables and writes new datasets, ad hoc queries through Databricks SQL warehouses, and experiments and exploration in notebooks. With the other sources they split into six kinds of job:
- Scheduled ETL, the largest kind: “most jobs just read from source tables, do ETL and write to another set of tables” (12:18), across thousands of Airflow DAGs.22
- Streaming ingestion: Structured Streaming merging CDC into Delta.
- Ad hoc queries and exploration: SQL warehouses, notebooks, A/B analysis, and the data agent’s own queries.11
- Feature computation: Chronon’s batch features and historical backfills.
- Training data preparation: scrubbing PII from conversations and assembling post-training data, the jobs that hit the row size limit.
- The platform’s own work: replication between clouds (a replication service running Delta deep clone) and turning Spark’s own run data into Delta tables for agents to diagnose jobs with.
The authors of these jobs are changing. The platform talk says that “almost all user jobs, whether Python or SQL, are written by AI” (34:54), and the observability talk says agents are now the first step in debugging Spark.2223 The platform therefore has to be built for authors who write fast and may not understand Spark well. Shadow Run and bounded debugging skills, both described below, exist for that reason.
Spark’s edges are as telling as its uses. Besides online serving, log search, low-latency streams and model training, which belong to other systems, even the replaceable parts of Spark’s own ecosystem were replaced: Delta metadata reads were slow, one JSON file per commit, so a Redis cache went in front; shuffle moved to Celeborn; the History Server was rewritten in Rust; and event storage moved to GreptimeDB.
Why not scripts, and why not a database
This section takes the question head on. Here are five options in order of scale and sharing, each asked three things: when it works, where it stops at OpenAI’s scale, and where OpenAI actually uses it.
| Option | Works when | Where it stops at OpenAI | Where OpenAI uses it |
|---|---|---|---|
| Python scripts | data fits one machine, one-off work, no downstream | size, retries, permissions | as the logic inside PySpark jobs |
| Single-node engines (DuckDB, Polars) | one person, one machine, a sample | no cross-machine shuffle, no cluster scheduling | not mentioned |
| OLTP databases | point reads, small transactions | complex joins cause incidents; no new tables | the products, by design |
| OLAP databases | scans and aggregates on built tables, sub-second | multi-stage builds, Python logic, hours-long jobs; own storage | ClickHouse, Rockset, Trino, GreptimeDB |
| Spark on an open lakehouse | large shared tables, many dependent jobs | latency, control-plane load, shuffle at scale | the default batch layer |
Scripts. A script is flexible, provided the data fits on one machine, the job runs once and nothing depends on it. OpenAI’s offline data meets none of the three. Size comes first: one fact table runs from terabytes to petabytes, far beyond one machine’s memory and network card, so it must be split across many machines. Once it is split, a join or group by between two large tables has to redistribute rows by key between machines, which is a shuffle. Across all of OpenAI’s jobs, shuffle runs on the order of 100 TB a second (15:27).22 Writing shuffle at that rate yourself means rewriting a distributed engine.
Reliability comes second. A failed script reruns from the start; Spark retries only the failed task, and Delta writes are transactional, so a failure never leaves half a table. Across hundreds of thousands of dependent jobs, that decides whether the day’s tables arrive on time.
Governance comes third. A script that reads and writes object storage directly bypasses the catalog’s permissions. OpenSpark’s answer works like this: the user hands a personal access token to the driver; the driver, through a DataSource V2 plugin, asks Unity Catalog for temporary credentials valid only for the table locations this query touches; and it passes those to the executors (11:27 to 13:22).5 For sensitive conversation data this layer is not optional. Scripts did not disappear: the business logic in PySpark jobs and the many Python UDFs are scripts, with distributed execution, fault tolerance and permissions handed to Spark. That is also why the Python ecosystem matters so much to this team.
Single-node engines. DuckDB and Polars are very fast on one machine and suit one person analysing a sample or a medium-sized dataset. They stop where scripts stop: joins between large tables need a shuffle across machines, there is no cluster-level scheduling, quota or retry, and concurrent writers to one table need the table format to sort them out. The sources never mention them. My reading is that they show up in individual notebooks for local exploration and not on the platform’s main path.
OLTP databases. The evidence is strongest here, because OpenAI wrote down the limits. The PostgreSQL post says a 12-table join was behind several serious incidents and asks teams to avoid complex joins; MVCC amplifies write-heavy workloads; writes go to one primary, an instance accepts 5,000 connections at most, and no new tables may be created.6 Habitat keeps its query model simple on purpose and sends complex queries to the Rockset replica.7 Analytics would drag these databases down, and exporting the data to the lakehouse for Spark protects them.
OLAP databases. This rung deserves the most attention, because OpenAI uses several: ClickHouse for logs, Rockset for complex reads of online data (it bought the company in 2024), GreptimeDB for Spark’s metrics and events, and Trino for short interactive SQL.21 Why did none of them replace Spark?
An OLAP database is at its best scanning by sort key and aggregating, returning in under a second on tables that already exist. Spark’s main job at OpenAI is building those tables: multi-stage transformations, joins between large tables, a lot of Python, jobs that run for hours. Such work needs intermediate results that can spill to disk, retries at the task level, compute separate from storage and capacity on demand, which is what a batch engine is designed for. The other difference is where the data lives. An OLAP database usually owns its storage, so using it as the main build layer seals the output inside it. OpenAI’s principle is one lake with no duplicate technologies: every table is in Delta, governed by Unity Catalog, and Spark, Trino and Databricks SQL all read the same copy. One reason GreptimeDB was chosen is that its data sits in Parquet that Spark can query directly, and the team still ETLs that data into Delta wide tables.23 My reading is that OLAP databases at OpenAI answer questions on tables, and Spark builds the tables they answer from.
Why Spark and not another engine
Once a distributed batch engine is needed, the candidates are few: Spark, Flink in batch mode, Trino in fault-tolerant mode, Ray Data, and the cloud warehouses. Five constraints that hold at once are what make Spark the answer.
| Constraint | What it demands | What Spark offers |
|---|---|---|
| A lakehouse built on Databricks | Delta tables, Unity Catalog | first-class support for both, managed or self-run |
| A Python organisation | batch jobs in Python, increasingly written by AI | PySpark, the most mature Python API among distributed engines |
| Privacy isolation | some jobs cannot run at a third party | the same code and catalog on managed and self-run clusters |
| Two clouds | data on S3 and Azure Blob, replicated | runs on both, with an open table format |
| Apache committers on the team | change the engine, keep internal patches | open source, upstream to send patches to |
The weightiest constraint is where the lakehouse came from: Spark came with Delta and Unity Catalog rather than being chosen. Running open-source Spark first meant solving how it would reach Unity Catalog, which the team did with its own DSv2 plugin, and Trino later used the same approach.5
The second is language. Even the stream platform chose PyFlink and did extra work to make it fit, and Spark jobs are “mostly written in Python” (6:24).85 As more jobs are written by models, PySpark’s maturity counts for more: models have seen far more of it than of any other distributed framework.
The third is privacy isolation. Spark is one of the few engines with a mature managed offering and a mature open-source one, so the same code against the same catalog runs on either side, chosen by how sensitive the job is. A closed cloud warehouse leaves no self-run fallback.
The fourth is two clouds. The platform ran short of capacity in one cloud and moved to a second, unnamed in ByteByteGo’s account, and the lake is now replicated both ways between Azure Blob and S3.3 A warehouse tied to one cloud would sit awkwardly there.
The fifth is people. About 95% of the team are data infrastructure specialists and about a third are Apache PMC members or committers, who can change the source and send patches upstream.9 The team keeps its own build of more than a dozen open-source tools, Spark among them, and now releases patches through tests and staging without a person in the loop.3
The case against needs stating as plainly. Spark’s latency per query is high, which is why short queries go to Trino and Databricks SQL. On Kubernetes it runs one pod per executor, which pushes the control plane to billions of requests a day. Its built-in shuffle cannot carry this volume. The History Server takes half an hour to open a large application. Long conversations hit the row size limit. Emma Tang herself said the next tenfold may require rewriting some fundamentals.9 The table format may not stay Delta either: in 2025 Chao Sun said the long-term wish was to move from Delta to Iceberg for its community and ecosystem; the job description speaks of building the lake and metadata systems on Iceberg and Delta; and the 2026 talk mentioned exploring a new table format.52422 My reading is that a change of table format would make Spark’s place firmer rather than weaker, because Spark supports Delta and Iceberg equally well, and that is the point of an open lakehouse.
Keeping the default standing at ten times a year
This section and the next follow the self-run track at hundreds of thousands of applications a day, from the two Glasgow talks. Their captions are YouTube’s automatic ones, and timestamps are those of the recordings. The platform talk gives its figures at 15:27.22
| Figure | Value | Where |
|---|---|---|
| Data | several exabytes, on AWS S3 and Azure Blob Storage | platform talk, 15:27 |
| Spark applications | hundreds of thousands a day, each a driver and dozens of executors | 15:27 |
| Kubernetes pods | tens of millions a day | 15:27 |
| Object store reads | several TB a second on average | 15:27 |
| Replication between clouds | several TB a second over Private Link | 15:27 |
| Celeborn shuffle | on the order of 100 TB a second across all jobs | 15:27 |
| Planning assumption | ten times more data each year | 35:14 |
At this size the first things to give way are the Kubernetes control plane, object store throttling and the shuffle service, well before Spark’s compute core. The talk’s architecture has four layers (0:53): entry points (Airflow, dashboards, other clients), a central metadata service for table definitions and locations, the engines, and each cloud’s object storage, kept in sync both ways by a replication service running Delta deep clone. Batch, heavy shuffle and Python go to Spark, short SQL goes to Trino, and both read the same Delta tables through the same metadata service: storage and table format are shared, and engines divide the work.
Gateway, scheduler and CRD
Three in-house components handle submission (2:09 to 9:06).22 Ignis is the gateway: every client submits, checks status and cancels through it, and it persists the job, negotiates a start with the scheduler and writes a SparkApplication custom resource (configuration, image, arguments) to one Kubernetes cluster. An Observer in each cluster writes the actual state back, so clients never need to know which cluster a job runs on.
Blaze is the global scheduler. Who runs next works much like Hadoop’s Fair Scheduler: hierarchical queues per team, each with a fair share, the queue furthest below its share first. Where a job goes defaults to the cluster with the most free resources, honouring a job’s cluster preferences and avoiding clusters whose Celeborn is under pressure.
flowchart LR
C["Clients: Airflow, CLI, dashboards"] -->|"submit, status, cancel"| I["Ignis gateway"]
I <-->|"when and where to run"| B["Blaze global scheduler"]
I -->|"SparkApplication CRD"| K["One of about 40 Kubernetes clusters"]
K --> SO["Spark Operator starts the driver and executors"]
K --> OB["Observer"]
OB -->|"actual state"| IDynamic allocation gives the scheduler an accounting problem. A job starts with few executors but can grow to maxExecutors at any moment. Counting only what it uses lets the scheduler overcommit, and jobs fight for resources as they scale up. Counting the maximum wastes a great deal. OpenAI reserves resources at the maxExecutors figure first, and switches to counting actual use once a job reaches 90% of its maximum (7:09 to 8:53); the speaker’s example was a job capped at 40 cores switching at 36. It is a parameter found in production, simple, and the kind of detail that decides the utilisation of dozens of clusters.
Shadow Run
With most jobs written and modified by AI, OpenAI needs a way to show that a change has not introduced a regression. Its answer is Shadow Run (9:13 to 13:45).22 A shadow run starts in one of two ways: configured on the gateway for a production job, so it is derived automatically, or triggered by hand for a job with one command. The Shadow Run service reads the original job’s configuration, image and arguments and builds a shadow workflow. The shadow job reads exactly the same input tables as production and may change the configuration or the Spark version, but its output sinks are rewritten to another location, so production data is never touched. When it finishes, input scanned, shuffle size and the resulting data are compared, and the change ships only if nothing regressed.
flowchart LR
G["Gateway setting or a manual command"] --> S["Shadow Run service"]
PJ["Production job: config, image, arguments"] --> S
S --> SJ["Shadow job: new Spark version or config"]
IN[("Production input tables")] --> PJ
IN --> SJ
PJ --> PO[("Production output")]
SJ -->|"sinks rewritten"| SO[("Shadow output")]
SJ -.->|"HTTP writes blocked unless allowlisted"| X["Outside services"]
PO --> CMP["Compare input scanned, shuffle size, results"]
SO --> CMP
CMP --> OK["Ship if nothing regressed"]Two implementation details make it work. An internal framework defines jobs, and sink table configuration is part of that framework, so rewriting the output means changing configuration, not user code; in the Q&A the speaker added that the same task template drives data lineage and the dependency checks for replication between clouds (38:40). And some jobs make HTTP requests or upload files, which a shadow job must not repeat against production services. The team patches the Python HTTP libraries that PySpark jobs use, so a shadow job can only read by default, and any write needs an explicit allowlist entry. My reading is that Shadow Run shows how much it is worth that a Spark job is a replayable, deterministic program: same input, same code, another version, and the results can be compared row by row. That old virtue of declarative data processing becomes the safety net once AI writes the code.
Control plane, network and cache
Tens of millions of pods a day, each creating, scheduling, pulling an image, deleting and being reclaimed, add up to billions of requests a day on the Kubernetes control plane (17:38).22 It was the first of four challenges, with quotas and S3 throttling, observability and operational load.
The first fix was to split horizontally: about 20 clusters in Azure and about 20 in AWS, each taking about a fortieth of the load, and each with its own Spark Operator, Celeborn, History Server and Observer (22:08). That relieved the control plane and fragmented shuffle: with a VPC per cluster, one huge join could fill one cluster’s Celeborn while its neighbours sat idle, and guaranteeing headroom meant overprovisioning every Celeborn cluster.
The second fix was a flat IPv6 network. All clusters share one VPC, and any pod can reach a pod in another cluster directly over the cloud’s native networking (24:44). With IP connectivity in place, DNS across clusters was still missing. Celeborn masters are few, so each gets a private Route 53 record, such as celeborn-master-1, pointing to a private IP unique across all clusters. Workers number in the thousands and their IPs change, so they cannot each have a record. Instead a worker registers with a master; a client connects to a master, which assigns workers and returns their IPs, and the client then connects to them directly. At this size Spark’s problems turn quickly into network, DNS and quota problems, which can be solved outside Spark.
The speaker called S3 throttling the worst recent problem (19:06): reads cross availability zones, bandwidth between data centres has a ceiling, and jobs that back off and retry add to the congestion. Measured with the team’s own analytics, more than 99% of object store traffic was reads, concentrated on data from the last hour, day and week (27:19), which is where a cache pays off.
So the team built a central S3 cache shared by several EKS clusters. Each worker owns a range of the data and caches it locally in 4 MB blocks, on EBS for now, with RocksDB indexing the blocks, so reading a range inside a 1 GB file fetches only the 4 MB blocks that range covers. A coordinator handles only worker discovery and health checks and stays off the read and write path. Early figures show a hit rate near 90%, which removes most S3 traffic (29:28). It runs only on the AWS side so far, because S3 throttles most often. In the Q&A the speaker added the decisive constraint: only immutable data files are cached; files that depend on consistency semantics, such as the Delta transaction log, never enter the cache, and there is no write caching (36:15). My reading is that the design works because of the lakehouse’s basic property that data files are immutable and only metadata changes: a Delta or Iceberg data file is never modified in place, so the cache has no invalidation to handle and only has to keep away from the transaction log.
Observability that agents can read
The observability talk opens by reducing every slow job to three questions (0:10): which run do you mean, where did the time go, and what changed.23 At OpenAI’s scale each is slow to answer. Some applications routinely have event logs over 100 GB, and opening one in the Spark History Server can take half an hour to render the first page (1:15). Once agents started answering Spark questions, every one of their tool calls waited on the same load (1:35). The team changed four things in turn.
| Step | What changed | What it fixed | What it left |
|---|---|---|---|
| 1. Event logs to tables | Flink parses each finished app’s event log into Delta tables | questions across applications | opening one application was still slow |
| 2. Snapshots and a Rust History Server | the driver saves its state; a Rust server restores it | P90 load about 10 times faster, P99 about 30 times; first load 3 times faster again | an expensive Flink pipeline |
| 3. Agents on the same evidence | Spark MCP, Celeborn MCP, a History CLI and bounded skills | agents debug with what a person would check | skills need weekly upkeep |
| 4. GreptimeDB | a listener streams structured records to GreptimeDB | one store for metrics, events and logs; the Flink job removed | profiles stay in Pyroscope |
In the first step, the gateway emits a Kafka event when a job ends, and a Flink job reads the event log from S3, parses it and writes each entity to a Kafka topic that existing infrastructure lands as a Delta table (3:14). The keys reuse the IDs of Spark’s AppStatusStore, so rows map one to one to the Spark UI (4:58). The speaker noted that LinkedIn reached the same conclusion at ApacheCon 2020: the History Server was not enough, and it sent Spark data through Kafka into Hive. These tables answer questions across applications, such as which stages spilled most yesterday (5:28), but opening one application was still slow.
The slowness is replay. While Spark runs, the LiveListenerBus hands every event asynchronously to several queues: AppStatusListener updates the KVStore that the live UI reads, and EventLoggingListener writes the same events as a JSON log. When the driver exits, the KVStore is thrown away. When someone later opens the finished application, the History Server creates a ReplayListenerBus and an AppStatusListener with live=false, decompresses the files one by one, parses the JSON line by line, and rebuilds from nothing the same KVStore the driver had (5:46). Upstream Spark has added a disk cache, a RocksDB backend and Protobuf serialisation since Spark 2.3, and none of them avoids replay (7:08).
The fix in the second step is direct: save the state the driver has already computed when it ends. Each entity class goes into its own file, as length-prefixed protobuf serialisations of KVStore entries compressed with zstd, and the manifest is written last as the commit point, so a reader never sees half a snapshot (8:23). When the History Server opens an application it checks the manifest and the schema version; a valid snapshot is restored straight into the KVStore, and a missing or invalid one (a crashed driver, a changed schema) falls back to replay, and both paths produce the same state. Two settings turn it on. On Spark 3.5 in production, P90 load time improved about tenfold and P99 about thirtyfold, the long tail most, because the largest applications skip the most replay (9:25).
What remained was decoding millions of records, holding them and rendering pages, so the team rewrote the History Server in Rust on prost, tokio and axum, in two or three evenings with AI tools, the speaker said (8:02). On top of snapshots, first load became about three times faster again, and navigation after loading about twice as fast (10:15). No JVM means no garbage collection pauses or JIT warm-up, one file per entity class lets restoring and decoding run in parallel, and compact typed structs with purpose-built indexes replace a generic store of Java objects. The API stayed the same, so the UI and the CLI got faster unchanged. The Flink pipeline then switched to reading snapshots too and sped up as well, and from then on the Delta tables and the History Server came from the same state (11:27).
The third step is about who reads the data. Inside OpenAI, the speaker said, people barely open anything but Codex and Slack (11:58), and an agent has no use for the Spark UI. For a single application the agent gets a Spark MCP server (jobs, stages, tasks, plans), a Celeborn MCP server (remote shuffle) and a Spark History CLI; comparisons across applications go to the Delta tables. Tools alone were not enough: with only MCP and the CLI, agents tended to pull too much data and reach weak conclusions (13:15), so the team wrote bounded skills. One skill asks whether the user is chasing a failure or a performance problem before spending tokens (14:52), and the scripts behind it check what a person would check: skew, partition counts, spills, shuffle, garbage collection and UDF use (15:58). Because Spark jobs live in the monorepo, Codex can go from a job ID to the Airflow DAG that submitted it, which retry it was and the business code itself (13:35). The skills change weekly with the platform, and one skill exists to update the others (16:51). The data agent post drew the same lesson: fewer, non-overlapping tools work better, and a table’s meaning lives in the code that produces it.11
The fourth step came quickly. The talk was written around February, and about three months after submitting it the team switched to GreptimeDB, “simply because we found it more effective” (19:02, 29:44). In the current path, a custom GreptimeDB listener in the Spark driver forwards structured records for applications, jobs, stages, tasks, executors and SQL plans to a Grafana Alloy agent in the same cluster, which batches them and retries writes into GreptimeDB (19:14). The History Server reads from GreptimeDB instead of S3 snapshots (20:23). The speaker gave three reasons (19:51): it is proven, citing Walmart’s production cluster of about 2,000 nodes; it puts event logs and metrics in one system; and its data sits in Parquet that Spark can query as it is. The team still ETLs the data out of GreptimeDB into denormalised Delta wide tables. A side benefit was retiring a pipeline: the Flink job that parsed event logs was “probably one of the most expensive Flink applications at OpenAI”, skew made it especially hard, and with the new path “we don’t really need Flink anymore” (20:28).
The platform talk reached the same choice from another direction. Metrics for every Spark task (read, written, time taken) mean millions to tens of millions of new series a day, a cardinality that Prometheus, Chronosphere and ClickHouse, with indexes held in memory, could not carry (19:43, 21:02).22 And logs in ClickHouse, metrics in Prometheus and Chronosphere and events in cloud storage could not be correlated during an incident (29:58).
flowchart LR
D["Spark driver with a GreptimeDB listener"] --> A["Grafana Alloy in each cluster: batching and retries"]
A --> G[("GreptimeDB: metrics, events and logs, as Parquet on S3")]
PY["Pyroscope: CPU and memory profiles"]
G --> HS["Rust History Server"]
G --> GF["Grafana"]
G --> SQ["Spark and Trino over the Parquet files"]
G -->|"ETL"| DL[("Delta wide tables, aggregates kept 90 days")]
G --> Y["Yoda agent in Slack"]
HS --> CX["Codex: skills, Spark MCP, History CLI"]
DL --> CXSo GreptimeDB holds Spark’s metrics, events and logs. CPU and memory profiles go to Pyroscope, which the speaker called the one signal GreptimeDB does not support yet (31:00). Grafana Alloy collects, Grafana and the Rust History Server read from GreptimeDB, and the data sits as Parquet on S3, where it can be mapped to Parquet, Iceberg or Delta tables and analysed with Spark and Trino (31:51). On the operations side an internal agent called Yoda pulls from GreptimeDB and other systems, answers “why is my job slow or failing” in Slack, and does root cause analysis when an alert fires (33:39). Retention came up in the observability talk’s Q&A: queryable, debuggable data stays in GreptimeDB for about two weeks, because some jobs run weekly and must be compared with the previous run, and aggregate statistics stay in Delta for 90 days (23:35). The speaker added that not every team should go straight to GreptimeDB (28:20).23
Greptime has an obvious stake, so everything above about GreptimeDB follows OpenAI’s speakers in the recordings, not the post’s own conclusions.
What a lakehouse engineer can take from it
The engine follows the access pattern. No single engine at OpenAI takes all the data. Point reads, log search, complex reads of online data, streams within seconds, short SQL and heavy transformation each have their own engine, and even two kinds of log go to two places. Get that table right and Spark’s boundary draws itself.
Spark’s value is that it is the default build layer of an open lakehouse. With data in object storage, in an open format, behind one catalog, engines can be swapped and can coexist, and the same layering let OpenAI move 600 PB to another cloud in two months. Before asking whether to use Spark, ask whether the data is in one open, unified lake.
Managed and self-run can coexist, split by sensitivity and cost. User jobs go to Databricks for the vendor’s engineering, and privacy-sensitive and platform jobs to OpenAI’s own Spark for control and cost. This works only because both share the catalog and the code; without that, two tracks become two warehouses.
An AI company’s lakehouse has new problems. Rows get wide, with long conversations and multimodal data. The privacy path runs all the way to post-training. Many job authors are models, so changes need something like Shadow Run before release and observability that agents can read. And at tenfold a year the control plane, object store throttling and cloud quotas give way first, so the work is splitting horizontally and caching in front, with the engine left in place.
Governance comes before everything built on top. One lake, every table produced by code in a monorepo and tagged with an owner, an importance level and a freshness target: the plain data agent and the migration handed to Codex both rest on that.
What the sources do not say
Each item below is missing from the sources or is an inference of mine from the text above.
- The split between Databricks and OpenSpark. No source gives the ratio or its direction; that the self-run share is growing fast is my reading.
- Today’s pretraining pipeline. The only hard evidence is GPT-3’s Spark
MinHashLSHdeduplication in 2020. That research runs these pipelines outside the data platform is my reading, and articles claiming OpenAI filters training data with Spark generally cite nothing. - Kafka’s size. Secondhand summaries give more than 30 clusters and twentyfold throughput; Emma Tang gives one cluster growing to five. The scopes probably differ, but no source says so.
- User counts and copies. One article gives both 4,000 and 5,500 users. Whether 1.5 EB counts the second cloud’s copy is not stated, and the jump from 600 PB in four months looks partly like a change in counting.
- The 100 TB a second of shuffle. It comes from the automatic captions at 15:27 and sits oddly beside several TB a second of reads, so it stays in the body with its timestamp and off the summary figures.
- Experiment analysis after Statsig. Not public.
- My other inferences. Deletion propagation as its own class of Spark job; wide rows as a defining trait of an AI lakehouse; governance mattering more than the engine; DuckDB and Polars living in notebooks; OLAP databases answering on tables Spark builds; a new table format strengthening Spark’s place; and Shadow Run and the S3 cache depending on replayable jobs and immutable files. Each is my explanation, not a statement from OpenAI.
Footnotes
-
Greptime, From Event Logs to GreptimeDB, 4 November 2026. ↩ ↩2
-
OpenAI, Rapidly scaling online storage to serve over 1 billion ChatGPT users, part I, 11 September 2026. ↩ ↩2 ↩3 ↩4
-
ByteByteGo, How OpenAI Built Its Data Agent, published 3 June 2026, with figures as of May 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
ClickHouse, Why OpenAI chose ClickHouse for petabyte-scale observability, 30 June 2025. ↩ ↩2 ↩3
-
Chao Sun, Scaling Apache Spark at OpenAI, Next-Gen Data Engineering, 23 October 2025, uploaded by Snowflake Developers on 31 October 2025: the Databricks and OpenSpark tracks, the three uses, the Unity Catalog plugin and the Ignis gateway. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12
-
OpenAI, Scaling PostgreSQL to power 800 million ChatGPT users, 22 January 2026, by Bohan Zhang. ↩ ↩2 ↩3 ↩4
-
OpenAI, Rapidly scaling online storage to serve over 1 billion ChatGPT users, part II, 23 October 2026. ↩ ↩2 ↩3 ↩4
-
Kai Waehner of Confluent, How OpenAI uses Apache Kafka and Flink for GenAI, 9 June 2025, a summary of the three Current 2025 talks. The Kafka cluster count, throughput and availability figures come from Confluent-side write-ups like this one rather than from OpenAI’s own material, and this post does not itself repeat them. ↩ ↩2 ↩3 ↩4
-
Gergely Orosz, San Francisco is back as the world’s leading tech hub, the Pragmatic Engineer, 28 October 2025, with an interview of Emma Tang: the four areas of the data platform, the Flywheel team, tenfold compute a year, the row size limit, Kafka clusters and the make-up of the team. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
-
Current 2025 London: Building Stream Processing Platform at OpenAI (Shuyi Chen, Joey Pereira), Taming the Kafka Chaos (Jigar Bhati) and Changing Engines Mid-Flight (Adam Richardson, Nat Wilson), which lists Spark Structured Streaming as the streaming ELT tool. ↩
-
OpenAI, Inside OpenAI’s in-house data agent, 29 January 2026, by Bonnie Xu, Aravind Suresh and Emma Tang. ↩ ↩2 ↩3 ↩4
-
Databricks, Inside the governed data platform powering ChatGPT, customer story, and OpenAI and Databricks at DAIS 2026. ↩ ↩2 ↩3 ↩4
-
OpenAI Help Center, How ChatGPT and our foundation models are developed. ↩ ↩2
-
Tom Brown et al., Language Models are Few-Shot Learners, 2020, and its NeurIPS 2020 supplemental material, appendix A: fuzzy deduplication within and across datasets with Spark’s
MinHashLSH, ten hashes. ↩ -
Greg Brockman with Robert Nishihara, fireside chat at Ray Summit 2022, 23 August 2022. ↩ ↩2
-
OpenAI, How we’re responding to The New York Times’ data demands, June 2025. ↩
-
OpenAI, Vijaye Raji to become CTO of Applications with acquisition of Statsig, 2 September 2025. ↩ ↩2
-
Amplitude, Amplitude and Statsig partnership, 5 May 2026: Amplitude takes on the Statsig platform, brand and customers, and works with the Statsig team at OpenAI during the transition. ↩ ↩2
-
OpenAI, OpenAI to acquire Neptune, December 2025. ↩ ↩2
-
Chronon documentation: offline computation and backfills run on Spark. ↩
-
OpenAI, OpenAI acquires Rockset, 2024. ↩ ↩2
-
Operating Apache Spark at OpenAI’s Hyperscale Lakehouse, Community Over Code Glasgow 2026, uploaded by The ASF on 30 October 2026. YouTube credits Wei Yan; the programme lists Chao Sun and Fred Liu for the session of the same title. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11
-
Beyond the Spark UI: Building Agent-Native Observability at OpenAI, Community Over Code Glasgow 2026, uploaded by The ASF on 30 October 2026. ↩ ↩2 ↩3 ↩4 ↩5
-
OpenAI, Software Engineer, Data Infrastructure, job description. ↩