DNS – the first distributed database

DNS was created in 1983. Before then, Stanford was storing the host name to IP address map on HOSTS.TXT, which obviously doesn't scale. DNS is the address book of the internet, which performs a simple function of translating domains to IP addresses. One way of looking at it is…

API for Assigning Timestamp

This is a follow-up post of my previous one about Spanner. There I talked about how Spanner uses TrueTime API to achieve external consistency at global scale and hide sharding and replication from users. In this post, I want to discuss different options of assigning timestamps and their usefulness to…

Notes on the Google Spanner Paper

This is my notes on the paper: Spanner: Google’s Globally-Distributed Database. I will first summarize the paper and try to explain how it works. At the end, I will list my opinion and questions about Spanner. What is Spanner It's a globally replicated database that hides sharding and replication.…

Understanding Paxos as a Read-modify-write Transaction

Paxos in one hand is very concise. It fits in a single slide. Paxos algorithm (https://blog.the-pans.com/paxos-explained/)On the other hand, Paxos is notoriously hard to apprehend. In this post, I will explain Paxos as a read-modify-write transaction, which is much more intuitive in my opinion. TL;…

Notes on the Amazon Aurora Paper

This is my notes on the paper: Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases. What's Amazon Aurora Functionally speaking, an instance of Aurora is same as an instance of MySQL. The differences are Aurora decouples compute from storage and it's fault-tolerant. It supports all ANSI isolation levels…

Non-blocking 2pc

2pc is a Blocking Protocol Two Phase Commit is a blocking protocol. It blocks when Coordinator is not available. Not only the transaction cannot make progress. Other transactions that conflict with the same set of keys are also blocked. Non-blocking 2pc Alternative Daniel Abadi proposed a non-blocking alternative for 2pc…

Consistent Badge Count at Scale

-- Scalable Read Atomic Transaction for Partitioned Datastore A StoryYou are building a messaging app. You start with a non-partitioned single database, where you store unseen message count and the actual messages in two different tables. It served you well ... until more and more people are using your app and…

Paxos at its heart is very simple

The Paxos algorithm, when presented in plain English, is very simple. -- Leslie Lamport 2001 [1] I am going to try explain the single decree Paxos in a way, hopefully, that's easy to understand. To this day, IMO, John Ousterhout's lecture on Paxos it still THE BEST out there. The…