I want to migrate my database instance from AWS RDS MySQL to Aurora, but I have a doubt about replication and how Aurora management the write/read operations.
I have my application and I want to separate the write operations from the reads. I want to create a Master instance only for write operations and other instance (Read Replica) only for read operations.
The problem is here, I read on AWS documentation that I need to do this separation on my Application and I think or I hope to find a way to do that and be transparent for my Application. I draw a simple schema do I have to do to get with Aurora (from AWS):
What AWS says do I have to do:
-----------------
| Application |
-----------------
| |
| writes |reads
| |
------------ ------------------
| Master | | Read Replica |
------------ ------------------
^ ^
|replication |
|____________|
What do I need:
I need the Master always keep with the write operations and it redirects the read to the Read Replica instance.
-----------------
| Application |
-----------------
|
|write/read
|
------------ Reads ------------------
| Master | <-------> | Read Replica |
------------ ------------------
^ ^
| replication |
|_____________________|
The replication is always running. But I want to separate the write and read process. So my summary:
The master instance detecte the different between writes/reads operations and all read operation will be manage by Read Replica.