Distributed Databases With Peter Mattis
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Prime Big Deal Days · Oct 6–7Offer from Amazon

Get the latest gadgets delivered free — and shop member deals

  • Fast, free delivery on millions of items
  • Access to Prime Big Deal Days deals on October 6–7
  • Prime Video, Amazon Music and more included
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

Peter Mattis, co-founder and CTO of Cockroach Labs and original creator of GIMP, appeared on The Pragmatic Engineer podcast to discuss distributed databases, his work on Gmail storage and Google’s Colossus, and how AI tools have increased his coding productivity. He shared engineering lessons including B-tree optimizations and Reed-Solomon erasure coding that cut Google’s storage overhead by 33%.

Peter Mattis, co-founder and CTO of Cockroach Labs and one of the original creators of GIMP, appeared on The Pragmatic Engineer podcast to discuss distributed databases, his engineering work at Google on Gmail and the Colossus storage system, and how AI coding tools have changed his productivity. Mattis said that AI has brought him back to writing code after years focused on management, and that he now feels more productive than when he shipped roughly 100K lines of database-grade code per year before AI, with no drop in quality — a claim based on his own experience rather than a formal study.

Matthi described a career arc that began with GIMP, the free open-source image editor he built with college roommate Spencer Kimball. The first version of the Google logo was created in GIMP, and in 2001 Sergey Brin personally recruited Mattis — an offer he initially declined because of an hour-long commute from San Francisco to Mountain View. He joined Google when the company approached him a second time, after a first startup attempt went nowhere.

At Google, Mattis worked on Gmail and distributed storage. He recounted that the first version of Gmail, launched on 1 April 2004 with 1GB of free storage — an offer so generous many assumed it was an April Fool’s joke — used B-trees in its storage layer to track email threads and unread counts. He later worked on Colossus, the successor to the Google File System, where he and the team pioneered Reed–Solomon erasure coding in a distributed file system. According to Mattis, Colossus reduced Google’s file storage overhead by 33% while increasing redundancy, replacing GFS’s model of storing three full copies of data.

A recurring technical theme of the episode was the B-tree. Mattis said he twice outperformed standard library data structures at Google: he replaced the red-black-tree-based std::map with a custom B-tree that was faster and smaller, and later built a Swiss Table hash map for Go that was faster than the existing implementation and eventually shipped in Go’s standard library with help from the Go team. He argued that much of distributed databases and storage — from Gmail’s backend to CockroachDB’s range index — comes to resemble a B-tree, a phenomenon documented in the paper The Ubiquitous B-Tree.

At a glance
reportWhen: recently published episode of The Pragm…
The developmentThe Pragmatic Engineer published a podcast episode in which Cockroach Labs CTO Peter Mattis discusses distributed databases, his Google career, and AI-assisted engineering productivity.

Why a Veteran’s AI Productivity Claim Matters

Matthi’s account is a data point from a practitioner with decades of shipping database infrastructure, at a moment when the industry is debating whether AI coding tools improve or dilute software quality. His claim that AI lets a senior domain expert produce more code with no quality drop — and his view that AI can multiply the impact of domain experts — supports the argument that these tools amplify experienced engineers rather than replace their judgment. The episode also touches on the future of code review, a topic of active concern for engineering teams adopting AI-assisted development.

The historical details carry their own weight for infrastructure engineers: the Colossus erasure-coding work is a widely cited example of how encoding schemes can cut storage costs while improving durability, a tradeoff every large-scale storage system faces today.

Amazon

Top picks for "distribut databas peter"

As an affiliate, we earn on qualifying purchases.

From GIMP to Gmail to CockroachDB

Matthi and Kimball created GIMP as students; Mattis said they nearly abandoned the project weeks before launch after seeing an announcement for a competing, more ambitious photo editor that was never heard from again. His takeaway for founders: assume dozens of people have your same idea, but most won’t ship.

After Google, Mattis co-founded Cockroach Labs, the company behind CockroachDB, a distributed SQL database designed for resilience and horizontal scale. He also retains what he calls “speed of light numbers” — mental benchmarks for network latency, similar to turbopuffer founder Simon Eskildsen’s “napkin math.” He noted that in-zone network round trips fell from milliseconds when Colossus was built to roughly 100 microseconds today, and that the fastest global packet route can run through space — up to Starlink satellites, across by laser, and back down — because light travels faster in a vacuum.

“There’s always going to be someone else working on your idea. You can’t get dissuaded if they pre-announce it.”

— Peter Mattis, co-founder and CTO of Cockroach Labs

Claims Based on Personal Experience

The productivity comparison — roughly 100K lines of database-grade code per year pre-AI versus higher output today — is Mattis’s self-reported estimate, not a measured or peer-reviewed result. The episode does not quantify what “no drop in quality” means or how it was assessed. Similarly, the 33% storage-overhead reduction from Colossus is presented as Mattis’s recollection of the project’s outcome; readers relying on it for design decisions should consult Google’s own published papers on Colossus and erasure coding. His observation about Starlink laser routing as the fastest global network path is presented as an illustration, referencing the paper Delay is not an option: low latency routing in space, not as a measurement he performed.

Where to Hear the Full Conversation

The full episode is available on YouTube, Apple, and Spotify, with a transcript and timestamps published on The Pragmatic Engineer’s site. Listeners interested in the technical deep dives — B-tree internals, erasure coding, and CockroachDB’s storage architecture — can follow the timestamps listed with the episode. Mattis also offered advice in the episode on leveling up engineering skills, which may be relevant to engineers weighing how to adapt as AI tools become standard practice.

Key Questions

Who is Peter Mattis?

He is co-founder and CTO of Cockroach Labs, the company behind the CockroachDB distributed SQL database, and an original creator of the open-source image editor GIMP. He previously worked on Gmail and distributed storage at Google.

What did Peter Mattis say about AI and productivity?

He said AI tools have brought him back to writing code after years in management, and that he feels more productive than his pre-AI pace of roughly 100K lines of database-grade code per year, with no drop in quality. This is his personal assessment, not a measured study.

How did Colossus improve on the Google File System?

According to Mattis, Colossus used Reed–Solomon erasure coding instead of GFS’s three full copies, storing data roughly twice while increasing redundancy and reducing file storage overhead by 33%.

What role did B-trees play at Google?

Mattis said the first version of Gmail used B-trees to track email threads and unread counts, and that he replaced the std::map red-black tree with a faster, smaller custom B-tree used inside Google. He argues the B-tree is a recurring structure across distributed storage systems.

Where can I listen to the episode?

The episode is available on YouTube, Apple, and Spotify, with a transcript and timestamps on The Pragmatic Engineer’s website.

Source: rss

FALL

Fall Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Using Any C++ Library In Godot

Conan’s new godot-cpp 10 package streamlines building C++ extensions and wrapping third-party libraries for Godot, including a 100,000-particle flecs demo.

Psn

PlayStation Network experiences widespread outages, affecting millions of users globally. The issue is confirmed but the cause remains under investigation.

Show HN: CheapSecurity – Lightweight, Self-Hosted CCTV For Linux SBCs

CheapSecurity introduces a new self-hosted CCTV system optimized for Linux single-board computers, offering affordable, lightweight surveillance.

10 Best Content Creator Laptops for Video, Photo, and Design Work in 2026

Explore the 10 best laptops for content creators in 2026, featuring top processors, displays, and storage for video, photo, and design work.