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.
pragyaasapkota / System-Design-Concepts
A repo with some system design concepts.
System Design
Systems design is the process of defining elements of a system like modules, architecture, components and their interfaces and data for a system based on the specified requirements.
This is a index for the concepts of system.
If you wish to open these in a new tab, Press CTRL+click
S.N. | Table of Content |
---|---|
1. | Caching |
2. | Network Protocols |
3. | Storage: The Underrated Topic |
4. | Latency and Throughput |
5. | System Availability |
6. | Leader Election |
7. | Proxies |
8. | Load Balancing |
9. | Endpoint Protection |
10. | HTTPS: Is it better than HTTP? |
11. | Polling and Streaming |
12. | Long Polling |
13. | Hashing |
14. | CAP Theorem |
15. | PACELC Theorem |
16. | Messaging and Pub-Sub |
17. | Database |
18. | Logging, Monitoring, and Alerting |
19. | Distributed System |
20. | Scaling |
21. | Event Driven Architecture (EDA) |
Thank you!!!
I hope this article was helpful to you.
Please don’t forget to follow me!!!
Any kind of feedback or comment is welcome!!!
Thank you for your time and support!!!!
Keep Reading!! Keep Learning!!!
Top comments (0)