In TAO a client reads from a follower and writes through a follower. It never talks to the leader.
The write takes one path:
- The client. It tells a follower it has a write operation.
- The follower. It talks to the leader.
- The leader. It does the write and comes back to the follower, which tells the client.
That follower and the leader have the latest data. A client that goes to another follower sees stale data, until change data capture propagates the write from the leader to all followers.
The leader has rate limiting, and the followers ensure it does not get overloaded.
Across regions the follower sends the write to the leader region, which updates its database. The MySQL bin log propagates it to the database in another region.
Inside a region the caches have one leader. The leader cache serializes the writes, and the database propagates its updates to that one cache alone. 99 point 8 percent of queries are reads, so one leader in each region is enough.