If we have a database system replicated in geographically separate locations... and we want to allow writes on each of them. What is the best way to do that?
For example: A site like expedia.com allows customers around the world to book any hotel.
Say customers in US, Europe and Asia are looking to book a room in the same hotel. We can read from multiple RO instances which are geographically separated (and replicated), so we show the customers that a room is available in that hotel.
Now if all these customers try to book, the easiest way would be to write to a single instance.
Before writing we check every time, if the room is available or not. If it is still available, we write.
In that way once the first request goes through we can reject the others.
But in this way customer in US (where the master instance is located) will have an unfair advantage as it takes longer time for the write request to go over the wire across long distances.
So we will have to allow write to multiple instance.. and then allow some time for it to sync across instances. But if we write to two instances how will we ensure that only one write request succeeds? I'm sure there must be some industry standard way of doing this. But I can't seem to find anything good to read.
Writes to geographically distributed database
85 Views Asked by gandalf_grey At
0
There are 0 best solutions below
Related Questions in DATABASE
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- How to not load all database records in my TListbox in Firemonkey Delphi XE8
- microsoft odbc driver manager data source name not found and no default driver specified
- Cloud Connection with Java Window application
- Automatic background scan if user edit column?
- Jmeter JDBC Connection Configuration Parametrization of Database URL for accessing SQL Database
- How to grant privileges to current user
- MySQL: Insert a new row at a specific primary key, or alternately, bump all subsequent rows down?
- Inserting and returning autoidentity in SQLite3
- Architecture: Multiple Mongo databases+connections vs multiple collections with Express
- SQL - Adding a flag based on results within a query - best practice?
- Android database query not returning any results
- Developing a search and tag heavy website
- Oracle stored procedure wrapping compile error with inline comments
- Problems communicating with mysql in php
Related Questions in DATABASE-REPLICATION
- RavenDB - null reference exception after resolving conflict?
- How to handle sequences in Bucardo Postgresql multi master
- Replication Data Issue
- How to do sharding and replication of Orient DB database
- Cassandra Table needs a lot of Storage space
- Remove replication from an MS Access Database?
- Can't start postgresql replication
- Looking for a substitute to access replication
- Create replica set for MongoDB in Linux
- Replication Issues for client machines connecting to Master in mysql
- How to get time offset between SQL Server master and replica?
- Switch MySQL slave to master - BINLOG_FORMAT
- MongoDB how to become master
- multimaster mysql replication position
- Sql Server Replication Errror: Login failed for user 'NT AUTHORITY\ANONYMOUS
Related Questions in SYSTEM-DESIGN
- How to pass values to stored procedure in oracle?
- How to design task assignment system?
- design system with server controlled UI display in Angular(Front-end)+ Java(Back-end)
- In App Purchase backend architecture: user accounts and protecting the app from "borrowed account" downloads
- System design for Appointment Booking System
- Entity relationships code first approach
- How to design a distributed job scheduler?
- How does the database write log atomically?
- maximum throughput in distributed processing (with netty 4.0)
- Python producer and consumer system design
- When to use service or component in spring?
- Data structure and systems design questions
- Transparent structures in networking - correct terminology?
- How does file convertors work in general like word to pdf, XML to json, word to txt etc
- Restrict access to a instance variable to only selected method in that class
Related Questions in DISTRIBUTED-DATABASE
- Accessing data on distributed database on OrientDB
- How to shard using OrientDB
- Making backup from database to another server
- Communication link failure: JDBC
- Distributed C++ game server which use database
- Understanding of hBase data storage (webpage) for Nutch
- Setting up a distributed database with TimescaleDB
- Looking for a lightweight-ish distributed DB/cache
- Bigtable secondary indexes : Best practices/Recommended-ways
- Do cross-partition queries break infinite CosmosDB horizontal scalability?
- Does 1 phase commit make sense in distributed systems?
- Strong consistency and replication factor
- Writes to geographically distributed database
- How to model "dimension" tables in TiDB?
- How to support GUID in Windows Azure Mobile services
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?