Asynchronous Replication:?
Short answer: Data is written to the primary database, and changes are replicated to secondary databases after a delay.
Explain a bit more
Advantages: Better performance due to less replication overhead. Disadvantages: Potential for data loss or inconsistency in the event of a failure. Tools for Replication: SQL Server: Use Always On Availability Groups or Transactional Replication. PostgreSQL: Use Streaming Replication or Logical Replication. MySQL: Use MySQL Replication or Group Replication. MongoDB: Use Replica Sets for automatic failover and high availability. Example (PostgreSQL Streaming Replication): # On Master Node wal_level = replica archive_mode = on archive_command = 'cp %p /var/lib/postgresql/archive/%f' # On Standby Node primary_conninfo = 'host=master_ip port=5432 user=replication_user password=replication_password' Database Scaling & Performance
Real-world example (ShopNest)
ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png