0

Data policies of our customers means we have to host our database in the UK / EU.

We currently have an US West EC2 instance (Windows) running as a web server. But since adding the new London RDS (SQL Server) instance the performance is noticeably slower than the same instance type in the same region.

I understand there is meant to be a little lag across two regions. But is there anything we can do to negate the slowness? Keeping in mind we can only store the data in the UK.

RDS Instance information

  • t2.medium
  • General Purpose (SSD)
  • iOPS Disabled
chris
  • 113
  • 4
  • What is the latency (roundtrip) between your US and UK server? That is what adds to your bad performance. Adding memory to the SQL instance could speed up things slightly. Best bet is to move the Web server to a UK based data centre. – John K. N. Aug 21 '17 at 10:51
  • How about using elasticache between the ec2 instances and the RDS database? this would speed things up by caching content closer to the US ec2 instances – Michael Brown Aug 23 '17 at 13:04

1 Answers1

1

Outline

According to this website the average latency between eu-west-2 and us-west-2 is around 190ms. That's a lot of latency. US-east-1 has around 95ms of latency, so significantly less.

Most applications are likely designed assuming the database and application server are located closely together. In this scenario the application can make frequent requests to the database without any significant impact to the application. High latency breaks that very reasonable assumption made by developers.

Best Solution - Colocate / CDN

The easiest and probably best solution is going to be to put the database and web server closer together. I suggest putting both in the same region, ideally the same AZ. Use the CloudFront CDN to increase performance by caching most resources close to the user.

This is most likely to meet you compliance requirements.

Solution Two - Read Replica

You can put an RDS read replica in the USA. Change your application so reads go to the local database and writes go to the master database.

This may not meet you compliance requirements.

Solution Three - Database Replication

You could potentially run your database so there are two live, master databases that synchronise with each other constantly. This increases your risk somewhat, and you may have to cater for this in your application, or at least detect it.

This may not meet you compliance requirements.

Tim
  • 31,888
  • 7
  • 52
  • 78