1

My organization has two North American offices that are close enough to share a single web app server and database with minimal latency. However, we’re opening an office in India and that amount of latency is not acceptable.

It has to be hosted on-prem for security reasons, so no cloud hosting.

What’s a common implementation of this scenario to ensure data stays in sync? Do you use multiple DBs with one being the master? Some sort of constant syncing? I’m a bit new to this problem. Any pointers would be amazing. MongoDB and PostgreSQL

Scott
  • 111
  • 3

1 Answers1

0

Generally, either move (a copy of) the data geographically closer to the user with a database solution, or move the client closer to the data with a client presentation thin client solution.

that amount of latency is not acceptable.

Have you measured this number? What matters is the number of calls from the client to the (web) server multiplied by the response time. Even if web server to database is not very latency tolerant, user to web server might be. Or not.

What’s a common implementation of this scenario to ensure data stays in sync? Do you use multiple DBs with one being the master? Some sort of constant syncing?

Yes, and more. Read PostgreSQL documentation including Comparison of Different Solutions, it has a good high level description. Note that this includes partitioning, each location could have a database server with only local data data, query both to find answers to global questions. Or you need to replicate it. Varies depending on user requirements.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34