PACELC Theorem: an ELC extension of CAP

Pragya Sapkota
2 min readOct 30, 2022

--

Image Source: Geeksforgeeks.org

We discussed CAP theorem in our previous article here. Now let’s discuss an extension of the CAP theorem — PACELC theorem. The first three letters of PAC are the same in CAP — Consistency, Availability, and Partition Tolerance. The rest — ELC stands for Else[E], even if the system runs usually, choose between Latency[L] and Consistency[C] of a replicated system. The theorem looks like we maintained high availability by replication.

The question here is why we need PACELC since the CAP theorem works a charm even when there are network partitions. But PACELC is an answer when we raise a question on CAP theorem — “What will happen to a distributed system if there are no network partitions?”.

There are the following things that the PACELC theorem states about a system that replicates data.

1. If statement

When there is a partition in a distributed system, the tradeoff between availability and consistency is done.

2. Else statement

When there is no partition and the system is running normally in a distributed system, the tradeoff between latency and consistency is done.

The examples to choose consistency and giving up availability alongside lower latency [PA/EC] are BigTable and HBase. MongoDB is also one of the examples of PA/EC since it goes for availability when there is a partition but chooses a partition in all the other cases. Likewise, to choose availability over consistency after the partition [PA/EL] are Dynamo and Cassandra. Else, they get on with lower latency.

Advantages of PACELC over CAP Theorem

  • Unlike the CAP theorem, PACELC considers latency and consistency as a tradeoff.
  • We can effectively use it to choose and design distribution systems.
  • It can get over the major downfalls of the CAP theorem.

I hope this article was helpful to you.

Please don’t forget to applaud this article and follow me!!!

Any kind of feedback or comment is welcome!!!

You can also subscribe to my stories via email so that you’ll get notified whenever I bring out an article on a new subject.

Thank you for your time and support!!!!

Keep Reading!! Keep Learning!!!

--

--