My goal is to have fault tolerance for read only queries with a Single
Primary and multiple replicas.
So to do that, I'm trying to use the connection validator (timeout = -1)
with DB.synchronize in the rack middleware to limit the "SELECT NULL"
queries to one per web request, as the docs state. This worked very well
when I just had a single primary defined. However once I defined read only
replicas, I get the following during a single web request on a replica:
SELECT NULL
MY QUERY1
SELECT NULL
MY QUERY2
(oddly I get a SELECT NULL on the primary as well during the web request)
I'm wrapping as follows:
DB.synchronize do
app.call(env)
end
I feel like I'm crossing the streams and as we all know crossing the
streams is bad. :)
Any ideas?
Thanks so much,
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/dd18e036-b3b1-4b19-893c-a09d280886cbn%40googlegroups.com.