In this post, I will discuss two phase commit (aka 2PC) distributed transaction commit protocol and some of the problems associated with it. What is a distributed commit protocol? A commit protocol is an algorithm used for atomically committing a transaction. Atomicity implies that either all the changes (writes / updates) in the transaction will... Continue Reading →
Building RPC layer in a distributed system using Netty – An introductory tutorial
In this post, I will talk about how we can build a minimal RPC layer of a distributed system using Netty. By the end of this post, readers will have some familiarity with Netty concepts, protocol buffers and how these can be put together to build an initial (somewhat rudimentary) version of messaging component in... Continue Reading →
Notes on Distributed Systems (Part 1)
Eventual Consistency in a shared data replicated distributed system implies the following: A read operation R on data object X is not guaranteed to return the value of most recent completed write operation W on data object X. Alternatively, in a distributed system based on eventual consistency, it is possible for the readers to see... Continue Reading →
Leader Election and Log Replication in Raft – Part 2
In the last part of this post, I gave a general overview of Raft followed by Leader Election algorithm. We now need to discuss, how leader does the consistent replication of log onto the follower nodes, few more safety properties, and constraints on the election mechanism. Log Replication For now let's assume that client requests... Continue Reading →
Leader Election and Log Replication in Raft – Part 1
In this post, I will talk about two critical components of Raft consensus algorithm. My post will majorly focus on the explanation of these concepts as I interpreted from this extremely good paper on Raft. Of few papers I have read, it is one of the most well written paper on distributed systems and related... Continue Reading →
What is the difference between scaling horizontally vs scaling vertically? How can this affect the design decisions that are made?
[Sharing my answer to the above question on Quora] Horizontal Scaling - also referred to as "scale-out" is basically the addition of more machines or setting up a cluster or a distributed environment for your software system. This usually requires a load-balancer program which is a middle-ware component in the standard 3 tier client-server architectural... Continue Reading →