Consistency Vs Availability

Systems could be scaled for more load

Vertically – Using a bigger machine
Horizontally – Using more machines ( this approach is becoming more prevalent … ec2 etc)

The other thing that we need to decide is Consistency or Availability ..

Consistency — Means all user requests will be processed in CONSISTENT time. This does not mean we will process all requests … some request will be returned with resource not present error. Once again Consistency means consistent in TIME to response not to response itself.

Availability — Means all user requested will be processes SUCCESSFULLY, but response time will not be consistent.

Unfortunately we cannot have both consistency and availability …. we can choose only one depending on what our business requirement.

2 thoughts on “Consistency Vs Availability

  1. I think, you mean Performance as “Consistency”, it can be measured as either “Response Time” or “Throughput”. We can set 2 second as the response time for all the requests (Consistency in your way) or 30 responses in 1 minute. When you scale your system up and the performance is poor, then it is not scalable.

    In addition to typical cluster based horizontal or tower based vertical scalability, there are few good alternatives available to get high availability, consistence and high scalability. It can be achieved by high level distributed caching and asynchronous databases (Ex: Terracotta, Gigaspaces)etc.

    Thanks,
    Senthil.

  2. Hi Senthil:

    When I say “Consistency”, I do not mean performance. Checkout my other blog about performance vs scalability (http://techbehindtech.com/2010/06/06/performance-vs-scalability).

    No matter what kind of high level distributed caching and asynchronous databases you use , you cannot have system ready for peaks that you do not expect. For example. let us take that your site is famous and you know you will have “slashdot” effect all the time. So you have necessary hardware and software architecture to handle this kind of load. Suddenly one day Oprah says that your site is so good. You will have like 10 times more traffic more than you can handle. In that situation, you have to decide whether you have to go with consistency or availability. You cannot have both.

    Let me know your thoughts.

    Thanks
    — Siva Jagadeesan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s