From what I understand from reading Amazon aurora documentation, even if Aurora master node synchronously write the WAL log to 4 of 6 storage nodes. Unless there is switch of master, the Aurora slave are only kept in sync using asynchronous log shipping directly from the master node.
If this is true, I would assume that it's possible for a client to write and commit a value to master node and then immediately send a read only query to one of the slave and observe the old value instead of the latest value that was just written.
this would mean it can only support snapshot isolation mode on the slave.
this seem like a very big limitation! And I wanted to make sure this is correct.
Replica lag for Aurora is very small relative to non-Aurora read replicas, but is still a non-zero value which you can monitor with CloudWatch metric AuroraBinlogReplicaLag
and AuroraReplicaLag
- documented more extensively at https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Monitoring.html. Specific to your question, Aurora doesn't write to all 6 copies of the storage syncronously - only 4. A 4-part blog super deep dive on how this storage system works can be found at https://aws.amazon.com/blogs/database/amazon-aurora-under-the-hood-quorum-and-correlated-failure, and I encourage everyone to read it. You can also read more about Aurora Replication at https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Replication.html. but Steve Buzonas is correct - if you need guaranteed read-after-write SERIALIZABLE
reads, then you need to read from the writer instance endpoint: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.Endpoints.html