4

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?

  • 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
  • 1
    @030 I can offer my experiences since asking the question, albeit it's a subjective view as I have no quantitative data. I can offer that a year and a half later, I haven't regretted my decision putting the master into us-west-2. Our users in any region don't seem to be impacted by having the master in us-west-2, at least from a UX perspective. I suppose at some point it could be worth measuring write times -- but to date I haven't had to. There's no business impact from any latencies due to the location of the master, that we can detect at least, so we're happy here. – Chris Dec 23 '19 at 15:05
1

It's been a while since posting the question, and a comment I made above seems to be helpful despite the fact it's using a quantitative assessment, so I'll post it here as an answer.

As per comment above:

@030 I can offer my experiences since asking the question, albeit it's a subjective view as I have no quantitative data. I can offer that a year and a half later, I haven't regretted my decision putting the master into us-west-2. Our users in any region don't seem to be impacted by having the master in us-west-2, at least from a UX perspective. I suppose at some point it could be worth measuring write times -- but to date I haven't had to. There's no business impact from any latencies due to the location of the master, that we can detect at least, so we're happy here

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.