r/DistributedComputing • • Feb 12 '23

How does high availability and strong consistency coexist for a website like say hotels.com which needs both?

Hi folks, I’ve recently been learning about the different replication models such as single leader and multi-leader. For a high volume website like hotels.com, you would need both:

  1. High availability, redundancy etc while serving a global customer base which points to the need for multi-data center, multi-leader replication model
  2. Strong read-after-write consistency so that the same room is not double booked and each user sees a consistent and latest view of the system.

How do the two coexist? What replication model is used in such cases?

2 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/Legal-Flower-9612 Feb 12 '23

The shopping cart thing you don’t need strong consistency for - you do need read after write consistency though. This was one of the first used cases of the amazon Dynamo system. Read after write consistency is guaranteed using ‘sticky sessions’ - client is always reading from the same replica it wrote to.