0

I'm planning to run Odoo on AWS. I need to have real time replication so that we have fail-over. EC2 instances would just have Odoo running and would be put under ELB. RDS (multi - az) postgres would be the database and EFS storage would host all uploads/dynamic files. This would work fine except if there is a region wide outage.

I would like to get suggestions on having a fail-over across regions. I guess I would be using Route 53 and EC2 instance in different regions. Since EFS does not support it I assume I have to use something like Gluster. RDS supports read-replicas across regions. But can we use that as the primary database automatically without doing anything in the AWS console (i.e human intervention). Also how does fail-over work exactly in this case? Will there be any downtime?

Prasanth
  • 103
  • 2

1 Answers1

0

If you set up an ELB a multi-AZ instance of RDS you're pretty safe. Region wide outages are rare. I would suggest a cost/benefit analysis before going to a mult-region setup - you'd need fairly incredible RTO/RPO or uptime requirements to justify that.

If you do need multi region, your best and maybe only option for multi-region load balancing is Route53. You'd need RDS set up with multi-region replication, though there's a risk there updating a read replica. You might have to give that some thought based on your use case. I'd probably use failover type routing, so the second region is only used when the first goes down completely.

You'd probably want a pilot light scenario, with minimal resources running all the time in the second region. If you can tolerate a little more downtime you could replicate the database but don't start any EC2 instances, then either manually start as required or script it with something like lambda.

Tim
  • 30,383
  • 6
  • 47
  • 77
  • Im not sure if I calculated right. But I think its around $1000/month more for the multi-region setup. The customer I'm working with is fine with that. But wanted to see if there are any catches to it. What are the risks with read replicas that you are talking about. Also are there any risks with file replication with Gluster or some other NFS? – Prasanth Sep 22 '16 at 20:52
  • The risk with a read replica is you can't write to it, or at least that writes aren't persisted or carried back to the master database. Because of that you may want to look into another way to do database mirroring that supports multiple master. File replication should be fine. I would really think hard about whether you need to do this, a failure that takes down all data centers in a region are very rare, and given you had to ask this question I suspect you will need help implementing a multi-region architecture. – Tim Sep 22 '16 at 21:36