Distributed databases with Peter Mattis
The Pragmatic Engineer
September 30, 2026
• turbopuffer – a vector and full-text search engine built on object storage. It’s fast, cheap, and extremely scalable • Linear – the product development system for teams and agents • WorkOS – everything you need to make your app enterprise ready.
Speakers Gergely Orosz, Peter Mattis
TopicsTechnologyNewsTech News
Gergely Orosz (0:00)
He built the GIMP image editor while at college, designed the original storage system behind Gmail, and built many more large, complex, and widely used systems. This is Peter Mattis, co-founder and CTO of Cockroach Labs. Before we sat down to talk, Peter told me, for the last 30 years, I've always been a prolific coder, but my current output is a bit insane. And this isn't vibe-coded junk, but database-worthy, high-quality, high-performance code, thanks to working with strong coding models. Today we cover why B-trees are so important when building databases, and why Peter kept reaching for the data structure over and over throughout his career, how he wrote 100,000 lines of production code per year pre-AI, stop coding between 2022 and 2024, and why he is back now, why he thinks AI agents are lazy about testing, and how this is an easier fix than it looks, and many more. If you're interested in distributed databases, distributed storage systems, or knowing how Peter manages to use AI to produce unusually high-quality and production-ready code, this episode is for you. This episode is presented by TurboBuffer, a ridiculously scalable fast and cheap hybrid search engine built on top of object storage by an engineering team I've really gone to like after spending time with them. The TurboBuffer engineering team is doing something really, really cool. They're completely redesigning their storage architecture from first principles to make storage faster, cheaper, and more reliable at scale. If you follow TurboBuffer, you know that their storage architecture was a massive part of their early success. Redesigning a winning architecture is a big deal. It's one thing for your query plan to pass unit tests. It's another to bring each query plan to performance parity or better while maintaining correctness and reliability in production. Here's a cool part. TurboBuffer is documenting the whole thing. Their new storage architecture, which they're calling TPUF v3, demands some hardcore systems engineering and they're building it in public, sharing design decisions and benchmark results as they ship. They're keeping a work log of their journey and the first post just dropped today. Follow along at turbobuffer.com/v3.
That is turbobuffer.com/v3.
Peter, welcome to the podcast.
Peter Mattis (1:59)
Oh, I'm happy to be here. This is awesome.
Gergely Orosz (2:01)
I want to get into. How did you get into tech originally? When did you figure out computers are interesting?
Peter Mattis (2:07)
I figured that out in elementary school, high school. Gaming was a little bit of a gateway drug for me as a software engineer, as many other people.
I remember early on, my mom did programming at IBM at some point. I'm never even quite sure what she did, but we had computers always around our house, like Apple II Plus, Apple II GS. I'm from that era on up and go to the bookstore, I'd find a book on Basic or a magazine, type in programs, no idea what it was doing. But I was addicted. You can put stuff into these computers, you can get interesting stuff out. Then I got to college and I was like, I didn't think there was any money in computers, I didn't know anything about it. I started as a mechanical engineer, following the footsteps of my dad.
Gergely Orosz (2:45)
So mechanical engineering as your socialization?
Peter Mattis (2:48)
As my major, yeah. And I got in there and I was like doing, like I'd done some computer stuff before. It's a real foolish move to do this, but first semester of doing these homework assignments and mechanical engineering, they were god-awful, like six pages for a single problem. And I happened to take a CS course at the same time. And it was so easy.
And then everyone was failing it. I'm like, I'm in the wrong field, let me switch.
Gergely Orosz (3:10)
And then you switched.
Peter Mattis (3:11)
Then I switched, yeah.
Gergely Orosz (3:12)
What was the first software that you built, either at college, it must have been at college, that you were like, all right, this is a piece of software that I'm kind of proud of. That's a complete piece of software.
Peter Mattis (3:21)
Well, I mean, the big thing that I did, along with my roommate in college, we had this course, was it a compilers course? I'm quite sure anymore, this is like 30 years ago. And we were kind of bored with it. So we wanted to do something like kind of fun on the side. And I'd done journalism in high school, my senior, junior, senior year. I knew stuff about kind of computer graphics and wanted to do something like Adobe Photoshop. So I started just kicking the tires and we built up this program that a lot of people know of called the GIMP. And along with the GIMP, I did a lot of the graphics library, GTK. This has since evolved just massively since then.
110 more minutes of transcript below
Thousands of transcripts fetched by people building searchable podcast archives
Fetch the whole transcript
The demo key returns a sample episode in full, no card needed:
curl -H "x-api-key: pt_demo" \
https://spoken.md/transcripts/1000651996090Markdown with the speakers named, for your notes, your knowledge base, or anything that makes HTTP calls.
From $0.10 per transcript. No subscription. Credits never expire. Prices exclude VAT, added at checkout for EU customers. Not what you expected? Email us within 14 days with 20 or fewer credits used and we refund the pack in full.
Using your own key:
curl -H "x-api-key: YOUR_KEY" \
https://spoken.md/transcripts/1000792417115