PKHunter
PKHunter

Reputation: 707

Connecting to Aurora RDS from my EC2 server

Nowhere does this seem to be documented, and a few questions on SO also presume that the Aurora RDS is available on "public dns".

  1. My EC2 server is in Ireland, another is in Tokyo. I may also get EC2 in North America.
  2. For all of these EC2 servers, I'd like my RDS to be the same, and "multi-AZ". Also, I'd like the RDS to be not publically accessible. Just to my internal network of EC2 servers.

With this setup, what should I do? In any of the above EC2, when I do this:

mysql -h  <endpoint>  -P 3306 -u <masteruser>   -p

This just hangs there. Which means the IP is being blocked? In my RDS security group, I've specifically allowed the IP of my EC2 instance.

Any ideas how to set this up, or any directions on this? Google searches haven't helped. Thank you!

Upvotes: 0

Views: 1171

Answers (1)

datasage
datasage

Reputation: 19563

RDS is not multi region. It will replicate between availability zones within one region, but not between regions. Network latency makes it a hard problem to solve when things like transactions and consistency matter.

Internal networking (VPC) is also limited to a single region. Though you could create VPN gateways to allow instances in other regions to communicate via secure channels.

Depending on your data an application, one of the following solutions may work.

  1. Cluster your application per region. Each region will have its own database and application instances.

  2. Keep your database in a single region but utilize CDN's and caching as much as possible to improve performance for other regions.

  3. Consider using a database that takes multi datacenter deployments into its design.

Upvotes: 1

Related Questions