Napkin Math #21: Index Merges vs Composite Indexes in Postgres and MySQ

While working with Readwise on optimizing their database, I found myself asking the question: How much faster is a composite index compared to letting the...

Napkin Math #20: Scaling Causal's Spreadsheet Engine from Thousands to Billions of Cells: From Maps to Arrays

Earlier this year, I spent a few weeks working with Causal on their core spreadsheet engine. Causal is a spreadsheet built for the 21st century to help...

Napkin Math #19: Metrics For Your Web Application's Dashboards

In the beginning of the year I was helping readwise.io get some of their observability up to snuff. A few weeks later "What should I monitor?" came up on...

Napkin Math #18: Neural Net from Scratch

Happy new year everyone! In this most recent post, we will establish a mental model for how a neural network works by building one from scratch! In a future...

Careful Trading Complexity for Improvement

Whenever you find yourself arguing for improving infrastructure by yanking up complexity, you need to be very careful. Published a new article this morning...

Napkin Problem 16: When To Write a Simulator

My rule for when to write a simulator: Simulate anything that involves more than one probability, probabilities over time, or queues. Anything involving...

Napkin Problem 15: Increase Performance by Fitting In the Initial TCP Slow Start Window

Did you know that if your site’s under ~12kb the first page will load significantly faster? Servers only send a few packets (typically 10) in the initial...

Napkin Problem 14: Using checksums to verify syncing 100M database records

A common problem you’ve almost certainly faced is to sync two datastores. This problem comes up in numerous shapes and forms: Receiving webhooks and writing...

Napkin Problem 13: Filtering with Inverted Indexes

Database queries are all about filtering. Whether you’re finding rows with a particular name, within a price-range, or those created within a time-window....

Napkin Problem 12: Recommendations

Since last, I sat down with Adam and Jerod from The Changelog podcast to discuss Napkin Math! This ended up yielding quite a few new subscribers, welcome...

Napkin Problem 11: Circuit Breakers

You may have heard of a “circuit breaker” in the context of building resilient systems: the art of building reliable systems from unreliable components. But...

Napkin Problem 10: MySQL transactions per second vs fsyncs per second

Napkin friends, from near and far, it’s time for another napkin problem! Since the beginning of this newsletter I’ve posed problems for you to try to answer....

Napkin Problem 9

Napkin friends, from near and far, it’s time for another napkin problem! As always, consult sirupsen/napkin-math to solve today’s problem, which has all the...

Napkin Problem 8

Napkin friends, from near and far, it’s time for another napkin problem! As always, consult sirupsen/napkin-math to solve today’s problem, which has all the...

Napkin Problem 7

Napkin friends, from near and far, it’s time for another napkin problem! As always, consult sirupsen/napkin-math to solve today's problem, which has all the...

Napkin Problem 6

Napkin friends, from near and far, it’s time for napkin problem number 6! As always, consult sirupsen/napkin-math to solve today’s problem, which has all the...

Napkin Problem 5

Napkin friends, from near and far, it’s time for napkin problem number 5! If you are wondering why you’re receiving this email, you likely watched my talk on...

Napkin Problem 4

Napkin friends, from near and far, it’s time for napkin problem number four! If you are wondering why you’re receiving this email, you likely watched my talk...

Napkin Problem 3

Napkin friends, from near and far, it's time for napkin problem number three! If you are wondering why you're receiving this email, you likely watched my...

Napkin Problem 2

Fellow computer-napkin-mathers, it's time for napkin problem #2. The last problem's solution you'll find at the end! I've updated sirupsen/napkin-math with...

Napkin Problem 1

Napkin friends around the world: it's time for your very first system' estimation problem! Confused why you're receiving this email? Likely you attended my...