...
/The Rationale Behind Chubby’s Design
The Rationale Behind Chubby’s Design
Let's recap Chubby's design decisions.
Chubby is a locking service that provides coordination between a large number of clients trying to do some work, for example, accessing a database. Let's explore some arguments as to why a lock service is added to the system.
Why use a lock service?
It could be argued that a library built around Paxos should have been used which only depends on a name service, instead of a library that accesses a central lock service. The reason is that a Paxos library would provide a standard framework to the programmers if their services can be implemented as state machines. Chubby does provide such a client library which is independent of it. Having said that, adding a lock service to a system does have advantages over using only a client library (that would need all the code for consensus and locking amongst independent parties).
Availability
Developers initially tend not to go for a highly available system. They start with prototypes that run with little load and low availability. While coding, they usually don’t put much thought into structuring their code so that it can be used with a consensus protocol.
However, when the service gains clients, it needs availability guarantees to improve. The following aspects are added to the existing design to increase availability:
Replication
Primary elections
Availability can be provided by a library that provides distributed consensus. However, an advantage of a lock server is that it makes management of the current program structure and communication patterns a lot simpler.
Example
If a system has to ...