RDS, we can not choose its availability zone? Should ECS Server be in same zone?

,

I can not see where to choose it? And what’s the performance hit? The only way I can see to rectify this is to launch ECS server in that same zone,.

You can specify the subnet group for your RDS instance when you create it. The subnets in this group should all have connectivity to your ECS task.

Here is a guide on connecting ECS to RDS. If the latency between AZs is really that bad (determine this with testing) then you can consider launching your ECS task in the same AZ as your RDS (if the RDS is single AZ it shouldn’t change AZs upon a host replacement)

To specify this answer OP: the subnet groups you choose, are assigned to AZs while you set up your VPC networking. Through choosing the right subnet groups, you choose the AZ you want.

Unless your access patterns, indexes, etc are near perfect, I wouldn’t be worrying about optimizing for having your RDS instance in the same AZ as your compute.

Since you’re asking this, are you not running your service across multiple AZs? And why use just one DB instance and not an Aurora cluster.

Hi thanks yes it is multi AZ.
Am interested to learn more about Aurora, seen that it did not have a multi-AZ option on the launch screen and thought it may not have those features yet.
So instead of a kind of hot spare this gives me my read-write DB and a read replica that gets utilised?

Aurora clusters can be setup to have multiple primary nodes for writes and/or multiple replica nodes for reads. These can be in whatever AZ you want.

Multi-az for the regular rds instances is just for failovers, not for having multiple up at once, you’ll have to manage that yourself when not using Aurora.

nice will play around with Aurora a bit

Have fun but just a heads up keep an eye on costs. v1 has its drawbacks, version limits and spin up delay, and v2 is nice but can get really expensive really fast. Depending on your workload RDS may be your better choice. Just throwing that out there.

Intra-region az communication is like 1ms. You’ll be fine.

I thought it might be 5ms or something but even if it is 1ms there would have to be a few routers/switches/links etc that could go down or get overloaded.