I've been doing a redirect-on-POST strategy for our REST API, meaning
after a POST that leads to a write into EventStore there's a redirect
and a GET for the view, where the URL contains the commit position of
the written event(s). The GET then waits for events with that commit
position to be seen in the database before processing the query. This
gives consistent reads, cluster wide.
However, I'm beginning to suspect that there's something not quite
working with this, and the main question is whether the commit
position is consistent cluster wide or just instance wide. Meaning, if
I write an event to instance A, get commit position X, and then
redirect to a server talking to instance B and wait for X, is it
guaranteed that the same commit position X will be reported for that
event? Or can event commit positions be different between instances,
given that for example each instance has its own set of internal stats
events(is that true btw, or are those events clustered as well)?
If commit positions are not guaranteed to be reported the same by all
instances in the cluster I'll probably have to switch to using the
timestamp of the event as the syncing factor.