3

I'm hoping this isn't so open ended that it veers towards a "discussion" more than an "answerable" question.

I need to place an RDS Postgres instance in an AWS region that will act as the master DB for writes from all other regions. Those regions will include Australian and European regions, as well as North American.

My concern is latency on writes. I will use replicas for reads, so that is not so much a concern.

I will be using interregion VPC peering for all regions to be able to communicate with the RDS instance.

I'm thinking that placing the RDS server in us-west-2 as it seems to be in the most "central" spot for all regions of concern.

I understand that the AWS "backbone" is very fast, and perhaps fast enough not for this to be a concern.

Has anyone dealt with this problem and have any metrics or other ways to quantify a decision on where to place this RDS instance?

  • You should, of course, design the application so that you can easily change this if the theoretical calculations don't align with reality... but this does seem like a question with an objective solution. Can you list the specific regions where you're planning to deploy? – Michael - sqlbot Jun 27 '18 at 12:18
  • 1
    Remember also that RDS will only manage 5 replicas of a Postgres instance. Unlike with MySQL and MariaDB, RDS apparently won't let you work around this using cascaded/subtended replicas. – Michael - sqlbot Jun 27 '18 at 12:19
  • 1
    I've collected a matrix of cross-region latency data for a project I've been working on... I'll plan to look at that model tomorrow and see what it thinks about the selection of us-west-2 for this scenario, or whether it recommends something different. – Michael - sqlbot Jun 28 '18 at 1:26
  • 2
    Something else to consider is that depending on the nature of the writes to the db, it can also make sense to shift some of the latency burden away from the app... e.g. app in ap-southeast-2 hands off the write to SNS in the same region, which asynchronously invokes Lambda cross-region, which does the DB update. The propagation time is higher, but the app doesn't have to wait for the write to complete. Obviously this is only suitable for non-critical writes, but it's a thought. – Michael - sqlbot Jun 28 '18 at 1:33
  • 1
    Nice... My model agrees that us-west-2 is the best choice, followed by us-west-1, us-east-2, then eu-central-1. The logic I used is slightly tricky to explain, but it is based on which region would be the closest, then the next closest, then the next closest, from each of your three... us-west-2 is its own 0th preference, of course; eu-central-1 has 6 regions closer than us-west-2, and ap-southeast-2 has 8 regions closer than us-west-2, but (0 + 6 + 8) / 3 is still a smaller (better) possible result of any other combo, even if we allow for the db itself to be in a region other than these 3. – Michael - sqlbot Jun 29 '18 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.