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
89 views Asked by gandalf_grey At
0
There are 0 answers
Related Questions in DATABASE
- How to add the dynamic new rows from my registration form in my database?
- How to store a date/time in sqlite (or something similar to a date)
- Problem with add new attribute in table with BOTO3 on python
- When an E-R attribute should be perceived as a relationship attribute or as an entity set attribute?
- SQLAlchemy: efficient relationship loading in 3-way many-to-many relationship
- Cannot connect to Postgres Database when running Quarkus Tests with Gitlab ci
- Local or remote database with react-native?
- I want to edit a specific row in database
- How to enter data in mongodb array at specific position such that if there is only 2 data in array and I want to insert at 5, then rest data is null
- Open Web Library
- database login.py and register.py error showing 404 file not found and doesn't work
- SQL71561: SqlComputedColumn: When column selected
- Liquibase as SaaS To Configure Multiple Database as Dynamic
- Updated max input vars but table still shows error
- Spring does not map set of roles
Related Questions in DATABASE-REPLICATION
- SQL Server Remove Replication from Table
- Postgresql Database Replicate Using Docker-Compose File
- SQL Server Replication - Transactional
- AWS DMS Task Migration Mapping Rules - Add-Column using metadata
- Changing binlog_format in MariaDB slave
- Master to Slave Replication pausing
- Kafka mirror maker: Data in some topics are not replicated
- ProxySQL as a backend for Wordpress results in login out user from wordpress
- How can I minimize data loss & data transfer when I failback with the requirement that I promote the old primary back to its primary status?
- Postgresql Replication Slot grows in GB suddenly
- How to replicate data from 1 VM into another VM on-prem with linux/ubunto server
- Replication postgresql database error connection between master to standby
- Is there a specified order for data replication among different partitions in Cosmos DB?
- SQL Server replication: Need to remove articles from the publication
- What does the value 30 indicate in the type column in the MSrepl_commands table?
Related Questions in SYSTEM-DESIGN
- How to design a request processing system calling external APIs with spring boot?
- how can i calculate mutual friends/followers efficiently?
- Handling media in chat apps
- How should I design the flow of new messages and accessing old messages in a chat app?
- Should you use the Command Pattern for requests involving very little logic?
- Kafka streaming service with pull model needs improvement
- Assignment to create a class diagram and structure the system correctly
- Designing reliable agent based push module to push data from one boundary to other
- DDD where to put logic where authority can lie with one domain and also with multiple domains
- Kafka streams in hexagonal architecture
- Microservcies workers and api
- AWS SES Configurations Across Environments
- How many architecture styles there are?
- Best Practices for Using Kafka in FastAPI Service for Periodic OTA API Calls
- Should micro-services query the database directly or go through graph ql api?
Related Questions in DISTRIBUTED-DATABASE
- What's the best practice to use OceanBase in cloud environment
- Load pre-training parameters trained on a single GPU on multi GPUS on a single machine
- Optimize database for top-k range query
- Bigtable secondary indexes : Best practices/Recommended-ways
- Mongodb transaction if document has multiple copies
- What happens to long running clickhouse updates if the client dies?
- Legal Hierarchical Quorums in Zookeeper
- How to handle data migrations in distributed microservice databases
- The relationship between Paxos family and data consistency
- How to remove all records from a DFS table but keep its schema?
- How to perform a table join on two DFS tables and update the left table based on its result?
- What is meant by Distributed System?
- Add on-premise CockroachDB node to a cluster hosted in Kubernetes
- Creating and migrating a devise-driven User model in a main/replica context
- Strong consistency and replication factor
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?
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)