3 ms·
Are you talking about stateless applications here? The story is a bit different for databases on AWS in my experience. Yes, you can do multi-AZ synchronous repl
by lxgr 7y ago
Are you talking about stateless applications here? The story is a bit different for databases on AWS in my experience. Yes, you can do multi-AZ synchronous replication, but failover times are between 1-2 minutes.
Also, I don't know how AWS implements failovers internally, but I can see several potential issues that could arise from connectivity loss between availability zones, especially if both EC2 and RDS are involved – few of which are trivial to handle if your application cannot tolerate loss of consistency.
- carlsborg 7y agoWe use DynamoDB for storage and state and its unaffected. Are you referring to this kind of scenario? https://github.blog/2018-10-30-oct21-post-incident-analysis/ https://github.blog/2018-10-30-oct21-post-incident-analysis/
- lxgr 7y agoThen you probably don't have the strict consistency and durability requirements that I mentioned. That is probably true for many use cases, but certainly not for all. Yes, after skimming your referenced article, this is exactly the type of issue that prevents a "simple" failover when databases are involved. Depending on your application, even returning stale data on one AZ in a split brain scenario might not be acceptable (this is a stronger requirement than not allowing non-reconcilable conflicting writes).
- carlsborg 7y agoDynamoDB allows strongly consistent reads and your data is replicated across AZs. Id argue that its even better than an RDS setup in that respect. RDS lets you choose a DB Engine (MySQL, Postgres, etc). the replication depends on the engine you choose, e.g. Postgres native streaming. Heres a good writup on how it works and best practices (https://aws.amazon.com/blogs/database/best-practices-for-amazon-rds-postgresql-replication/ https://aws.amazon.com/blogs/database/best-practices-for-ama...)