Grokking the System Design Interview
Ask Author
Back to course home

0% completed

Vote For New Content
Kushidhar Reddy
How does databases sync in multiple servers ?

Kushidhar Reddy

Oct 16, 2024

Hi, how does all the databases are in sync when the load balancer (before api gateway) distributes the requests to multiple servers. There can be conflicts, how they are resolved.

0

0

Comments
Comments
Raunak Baliyan
Raunak Baliyan5 months ago

All servers are connected to a single database, which may have internal replicas or clusters. The DBMS manages synchronization and conflict resolution, ensuring data consistency.

Raunak Baliyan
Raunak Baliyan5 months ago

Conflicts arises when multi master or eventual consistency, comes in databases. Various ways to solved this: 1. Last-write-wins (LWW)

  1. Time-Stamp or version based conflict resolution

etc.

On this page

  1. Why do we need URL shortening?

Try it yourself

Designing URL Shortener (video)

  1. Requirements and Goals of the System
  1. Capacity Estimation and Constraints
  1. System Interface Definition
  1. Create Short URL API
  1. Redirect API
  1. Analytics API
  1. URL Management API
  1. Delete Short URL API
  1. Database Design
  1. Basic System Design and Algorithm

a. Encoding actual URL

b. Generating keys offline

  1. Data Partitioning and Replication
  1. Cache
  1. Load Balancer (LB)
  1. Purging or DB cleanup
  1. Telemetry
  1. Security and Permissions