Availability vs Consistency

 


Let’s understand few terms from the question.

Availability refers to a system or application which is online, or uptime is always guaranteed (100% success rate to ping command).

Reliability refers to the ability of the system or application to perform the work that it is intended to (Responding with 200 HTTP response for every request).

Stale data refers to data which is not up to date or old. Let’s say I updated by WhatsApp profile picture, but my contacts are still seeing the old picture – This is called “Eventual consistency”.

Strong consistency refers to the data is always the same when queried at time. Let’s say I send 100$ to my friend, then my bank balance should immediately reflect the debited amount and show the updated balance.

Depending on critical user journey of the application we can combine the above terms to build the application.

In an e-commerce application, it is mandatory to have the application always UP compared to strong data. User-facing is the first point of entry for the customers to navigate the product and add it to the car. User-facing application is the one which is bringing revenue to the company. It is ok to have stale data compared to availability. During the product check out the state data like cost of the product can always be updated.

In a banking/healthcare/financial/reservation application, consistency takes preference over availability.

Many applications are built in hybrid models (Availability w/ stale date and strong consistency).



Comments

Popular posts from this blog

K8s - ETCD

SRE/DevOps Syllabus

K8s - Deployment and HPA replicas