Talks to Watch

"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson

56K views · Sep 20, 2014 · 40:20 · 12 HN recommenders · 20 mentions · discussed 2014–2024

Will Wilson of FoundationDB explains how the team tested their distributed database using deterministic simulation. By running the whole system in a simulator with injected faults and reproducible seeds, they could find rare concurrency and network bugs.

Why Hacker News points people here: HN treats it as the canonical talk on simulation testing and a mind-blowing example of how far rigorous testing can go.

“this is one of the most amazing talks on distributed systems”HN comment, 2018

What Hacker News said 20

Strongly recommendsteerayMar 2015

“It's well worth a watch if you want to understand the punishment that they put this database through”

Shows the extreme simulation testing FoundationDB was subjected to

Full comment

One of their engineers gave a great talk at Strangeloop ( this video ) that shows some of the amazing simulations they ran FoundationDB through. It's well worth a watch if you want to understand the punishment that they put this database through to make it stand out.

in “Apple Acquires FoundationDB” · view on HN
Strongly recommendschubotMay 2018

“I recommend watching the whole thing”

How determinism tames the infinite interleavings problem in testing

Full comment

This talk was about Foundation DB was brought up recently, and it's pretty amazing. I recommend watching the whole thing, but to be brief they are taming the "infinite interleavings" problem through determinism. "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson this video They wrote an interesting Actor DSL that compiles to C++ and is completely deterministic, and they torture this deterministic engine with generated test cases on a cluster every night. I guess you could say that the whole cluster is necessarily non-deterministic, but an individual node is deterministic, given an ordering of the messages it receives.

in “The Problem with Threads (2006) [pdf]” · view on HN
Strongly recommendsrubyn00bieNov 2018

“this is one of the most amazing talks on distributed systems”

Mind-blowing talk on testing distributed systems at FoundationDB

Full comment

Soooo stoked. This should make futzing with it to get started a lot easier. I've been thinking about going to the FoundationDB summit to hopefully learn more... Does anyone have any good resources for learning about it? I've tried a few times but find the documentation a bit hard to grok. Maybe I'm just slow. Also if you haven't seen it, this is one of the most amazing talks on distributed systems (because it's about testing them) I've ever seen (by Will Wilson from FoundationDB pre-Apple merger): this video Truly mind blowing how good FoundationDB is supposed to be for its use cases, and this Mongo layer is just the business when it comes to helping adoption.

in “FoundationDB Document Layer” · view on HN
Strongly recommendssgk284Jun 2021

“Here's another excellent talk at Strangeloop on FoundationDB's simulation testing by Will Wilson in 2014”

Excellent talk on FoundationDB's simulation testing

Full comment

Here's another excellent talk at Strangeloop on FoundationDB's simulation testing by Will Wilson in 2014: this video

in “FoundationDB: A distributed, unbundled, transactional key value store [pdf]” · view on HN
Strongly recommendsLAC-TechSep 2023

“Well worth a watch for anyone interested in distributed systems & reliability.”

Built the database simulation first, then plugged in real storage and network

Full comment

"FDB can tolerate f failures with only f+1 replicas." Wait a minute, I know that formula... Viewstamped Replication?? I need to read the foundation DB paper. (I mainly read CRDT stuff so hopefully it's understandable). --- In general I'm really impressed foundation DB folks. The talk "Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson blew my mind. TL;DR they spent the majority of their initial dev effort into making a simulation of the database, then when they were happy with that plugged in real storage, time and networks at the end. Well worth a watch for anyone interested in distributed systems & reliability. this video

in “How FoundationDB works and why it works” · view on HN
RecommendsitpDec 2014

“you should take a look at the talk my colleague Will Wilson gave at Strange Loop”

In-depth look at FoundationDB's deterministic simulation framework

Full comment

I'll give you some brief thoughts from my experience working at FoundationDB, but if you really want the in-depth answer to what makes our simulation framework an enabling technology for everything we do, you should take a look at the talk my colleague Will Wilson gave at Strange Loop [0]. Everything in our core is written in Flow, our asynchronous programming environment. The architecture of our server is essentially single threaded, with (pseudo-)concurrent actors allowing a single process to satisfy multiple roles at once. The interfaces that these actors use to communicate -- with the disk, over the network, with the OS in general -- are abstracted and implemented in Flow as well. Each of these interfaces not only has at least one "real" implementation, but at least one, and sometimes more, simulated implementations. Since we run multiple actors in a single process all the time, running yet more actors, pretending to be different machines, all still in the same process, was an obvious step. These workers communicate with each other via the _same_ network interfaces that real-world workers do in real clusters. In the end we are able to become our own adversaries, pushing the limits of the system in ways that just don't happen often enough in the real world to test and debug in the wild. Our simulated implementations are allowed to present any behavior that can be observed in the real world, or justified by the spec, or implied by the contract. And they can do so much more

RecommendsStreamBrightSep 2018

“Few ideas what could go wrong you can get from this video”

Shows what error scenarios can break a homemade key-value store

Full comment

>>> But for the Web site for my startup, early on it was clear that I needed a good key-value store as a Web user session state store (server). So, I designed one, coded it up, and have been using it. It seems to work fine. Well depending on what error scenarios you might run into your code will work until it runs into those scenarios. Few ideas what could go wrong you can get from this video: this video

in “CrimsonDB: A Self-Designing Key-Value Store” · view on HN
RecommendsdrejFeb 2020

“There is a great talk about this testing”

Great talk on deterministic seeds and testing

Full comment

There is a great talk about this testing, it goes all the way to deterministic seeds and other basics. The level of determinism is admirable. this video

in “Challenges with distributed systems” · view on HN
RecommendsarohnerAug 2023

“Watch for a good example of how this has already been done in practice.”

Good example of deterministic testing done in practice

Full comment

It is a tall order, but but it's doable. The most important thing is to reduce the surface area of your application. Our business logic is almost entirely pure. The 'procs' have no side effects, except for things that happen on the other side of a clojure protocol (java interface). That means all side effects can be stubbed out during tests. Our "user" code has no access to threading libraries. Threading happens in "kernel" code. Watch this video for a good example of how this has already been done in practice.

in “Griffin - A fully-regulated, API-driven bank, with Clojure” · view on HN
Recommendsjrvarela56Sep 2023

“this is a great video that explains how the team tested it”

Explains how FoundationDB was tested, including custom power supplies

Full comment

Tangent about FoundationDB: this is a great video that explains how the team tested it this video Spoiler: they even had their own custom power supplies used to test against power failures.

in “How FoundationDB works and why it works” · view on HN
RecommendsgeorgelyonNov 2023

“they have a testing infrastructure that is unlike any other database”

Shows FDB's unlike-any-other database testing infrastructure

Full comment

The great thing about FDB is that they have a testing infrastructure that is unlike any other database: this video If there is a Swift compiler bug that causes data loss I will bet money they will catch it (I will also bet they will find at least one Swift compiler bug)

in “Swift as C++ Successor in FoundationDB [video]” · view on HN
RecommendsmerqurioDec 2024

“there's an amazing video about how they test it that really got me into learning more”

Amazing video on how FoundationDB is tested

Full comment

FondationDB is such an incredible resource, but it’s so hard to access for the general public. It’s no wonder so few people know about it. I’ve always thought that if there were easier ways to interact with it, or some dev-friendly layers built on top (or public) it would become way more popular. it has shown how well it scales with Apple and snowflake, but is not an obvious choice for non-internet scale applications. If you don't know about FDB; there's an amazing video about how they test it that really got me into learning more: this video

in “7 Databases in 7 Weeks for 2025” · view on HN
Cites itSmerityOct 2015

Cited as evidence of FoundationDB's heavy focus on testing

Full comment

I'm very excited by this work. As they say, testing for distributed systems leaves a great deal to be desired, but there work is a great step! I was excited for FoundationDB, who put a great deal of focus on testing[1], but they were acquired into mystery by Apple. To give you an idea of how well tested they were, Aphyr of "Call Me Maybe" fame didn't test them "because their testing appears to be waaaay more rigorous than mine"[2]. FoundationDB ran Jepsen internally anyway[3]. DEMi is a really nice tool that has me excited. I've worked with similar test systems for non-blocking IO models and they're hugely useful. For non-blocking IO, you can artificially accelerate time as you can leap to the next interrupt, speeding up fuzzing substantially (see: Flow from FoundationDB in [1]). @ikneaddough, the demi-applications repo notes Spark, have you tested it so far? I quite like Spark but had some very temperamental issues at scale. [1]: this video [2]: link [3]: link

in “Fuzzing Raft for Fun and Publication” · view on HN
Cites itnickpsecurityAug 2019

“while doing QA like this”

Example of rigorous QA enabling fast development velocity

Full comment

Their development velocity might have been due to their management or internal culture. You can get most of those results faster and on a budget. The best evidence was the startup behind FoundationDB continually improving their product in highly-competitive space while doing QA like this: this video Generally, on top of code reviews, one can get high return with minimal labor and hardware with a combo of Design-by-Contract, contract/spec/property-based testing, low-F.P. static analysis, and fuzzing with contracts in as runtime checks. That's my default recommendation. In Github's case, they also might have access to both closed and open tools that Microsoft Research makes. MSR is awesome if you've never checked them out. Two examples applicable to system reliability and security: link link Plus some of their other tools in various states of usability: link

in “GitHub Outage Currently Ongoing – Issues, PRs, Notifications” · view on HN
Cites itinaseerSep 2020

“It sounded mind-boggingly cool when I first came across this way of testing distributed systems through Foundation DB”

Inspiration for testing distributed systems via Coyote

Full comment

Neat to learn about thread sanitizer. It sounds similar to another tool from Microsoft Research called Torch ( link ) which automatically instruments binaries to detect data races. Coyote is similar in some ways but different in others. Coyote serializes the execution of the entire program (running one task at a time), exploring one set of interleavings and then rewinding, and then exploring another set of interleavings, hoping to hit hard-to-find safety and liveness bugs. In addition to finding concurrency bugs in one isolated process, we use it to find bugs in our distributed system by effectively running our entire distributed system in one process and having Coyote explore the various states our system can be in. It sounded mind-boggingly cool when I first came across this way of testing distributed systems through Foundation DB ( this video we're emulating this kind of testing in our distributed system through Coyote. And unlike Foundation DB which had to develop their own variant of C++ to be able to do this kind of testing (kudos to them for doing it), Coyote allows us to do it on regular C# programs written using async/await asynchrony and benefit from decades of Microsoft Research in exploring large state spaces effectively.

in “Even in Go, concurrency is still not easy” · view on HN
Cites itdangerlibraryJul 2021

Example of deterministic simulation used to test a distributed database

Full comment

The FoundationDB team took a different approach, that I found pretty interesting. They created a fully deterministic (single threaded) simulation of a distributed database, and then use that simulation to test their implementation of the database under difference scenarios. They'd probably be interested in something like what you describe, as the bulk of their work seems to be rooting out and squashing bugs caused by factors out of their control (dropped connections, etc.) this video

in “Software engineering research is a train wreck” · view on HN
Cites itphiloviveroMar 2022

“He is talking about swizzling, which is like clogging++.”

Discusses swizzling, a fault injection technique that exposes many bugs

Full comment

I was watching the old 2014 video: this video I've included the timestamp of the relevant bit. He is talking about swizzling, which is like clogging++. He says they take a subset of the network connections, and have them timeout, but then bring them all back in reverse order, and that this somehow exposes far more bugs than other methods. This seems like a very interesting "well, that's funny!" moment that might lead to understanding something foundational about how distributed systems fail. Does anyone have more insight on this?

in “FoundationDB: A distributed unbundled transactional key value store” · view on HN
Cites itandrewflnrApr 2022

Example of a team writing a compiler to build a test simulator

Full comment

AHA! I should have known that generation-reference business was intended for games all along. Reminds me of the time the FoundationDB team wrote a compiler to write a simulator to test their database: this video

in “Accidentally making a language, for an engine, for a game” · view on HN
Cites itleetroutJul 2023

Shows building the simulator first and relying on it

Full comment

What always fascinated me is they built the simulator for the database first(ish) and relied on it as a first class citizen while building the DB: this video > We wanted FoundationDB to survive failures of machines, networks, disks, clocks, racks, data centers, file systems, etc., so we created a simulation framework closely tied to Flow. By replacing physical interfaces with shims, replacing the main epoll-based run loop with a time-based simulation, and running multiple logical processes as concurrent Flow Actors, Simulation is able to conduct a deterministic simulation of an entire FoundationDB cluster within a single-thread! Even better, we are able to execute this simulation in a deterministic way, enabling us to reproduce problems and add instrumentation ex post facto. This incredible capability enabled us to build FoundationDB exclusively in simulation for the first 18 months and ensure exceptional fault tolerance long before it sent its first real network packet. For a database with as strong a contract as the FoundationDB, testing is crucial, and over the years we have run the equivalent of a trillion CPU-hours of simulated stress testing. link

in “FoundationDB: A Distributed Key-Value Store” · view on HN
Cites itbobnamobNov 2024

“see for some of their handiwork”

Shows the handiwork of the FoundationDB folks who founded Antithesis

Full comment

> We would like to combine Jepsen’s workload generation and history checking with Antithesis’ deterministic and replayable environment to make our tests more reproducible. For those unaware, Antithesis was founded by some of the folks who worked on FoundationDB - see this video for some of their handiwork. A Jepsen + Antithesis team up is something the world needs right now, specifically on the back of the Horizon Post Office scandal. Thanks for all your work highlighting the importance of db safety Aphyr