0

I have an aws ec2 instance in N.Virginia, an Ubuntu machine with everything inside (mysql as well as apache).

Basically all these while, I'm running it on one instance alone, with just image backups and sql backups, but no extra instances nor ELB/ALB/NLB. I am using cloudfront for images, and the rest will be from my server itself (some javascript files and css files for example, as well as mysql queries).

I noticed that, around 30% of my users are from Asia (Singapore, Malaysia, Indonesia).

With this being said, I stumbled into Route 53, and my initial/current plan would be

  1. Transfer N.Virginia instance's domain (currently from GoDaddy) to aws, and enable Route53 for it (is the transfer a must? Or can i just enable route53 and update the 4 addresses in Godaddy?)

  2. Start another ec2 instance in Singapore (the nearest)

  3. Enable geographic routing for N.Virginia instance to Singapore instance

That being said, based on what i know, this should only change for the loading of files (javascript/css files etc..) and not affect mysql (still based on N.Virginia).

I was hoping this approach could slightly speed up my system, but how do i measure the change? And is it possible to measure or get a confirmed answer before implementing it.

Thanks.

1 Answer 1

0

Route53 might help a little bit, but not a lot. Here's my first set of suggestions:

  • Keep your domain registration where it is, but move domain serving to AWS Route53
  • Set up the CloudFront CDN in front of your instance. The first 1TB of traffic is free. This will cache static resources near your users, and dynamic resources will go most of the way over the AWS backbone rather than the internet. Make sure your caching headers are set up correctly.

If that's not fast enough then you can set another instance of your application in the Singapore region, but then you have to consider data replication / consistency. Based on your question I'm not sure you should attempt that.

2
  • Cloudfront is already set up. Just that we wanted to serve to Asia region slightly faster, and hoping my approach above would actually make a noticeable difference. Data replication wouldn't be an issue, because the main database will still be in Virginia, Singapore's instance would just be used to serve dynamic contents like javascript files and html view that's ever changing. My question would be, how do I even know if it's "faster"? How to do the measurement of it, and is it possible to do the measurement before deployment (don't want to waste the time, money and effort for nothing). Sep 22, 2022 at 1:44
  • CloudFront should cache static resources near the user if you set caching headers properly, another server is not necessary. Route53 DNS might make it a tiny bit faster on the first domain lookup by reducing DNS lookup latency, but given it's cached it's not a big difference. You can test website speed using webpagetest.org or similar. You should probably hire a professional to help you with this.
    – Tim
    Sep 22, 2022 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .