Today is my last day in Asia (China and Taiwan), and between the sessions I had the time to code a small proof-of-concept for people that are asking how they could read their writes on all nodes and ensure the read consistency with their last write ?
The usual (and easier) answer to this particular question is to read on the same host you just wrote. But currently MySQL provides you all the elements to force a consistent read across all the nodes of a group.
Since MySQL 5.7.5, we introduced session_track_gtidsand in 5.7.6 we also introduced GTIDs context to the OK packet (session tracker) (WL#6128 and WL#6972). So we can use this implementation in …
[Read more]