how async replication affects local (and remote) latency with both local and wan replicated members?

28 views
Skip to first unread message

Dan Denson

unread,
Feb 4, 2018, 2:02:38 PM2/4/18
to codership
here's my use case.

asterisk multi-site cluster with realtime extensions, fairly heavy read queries (lots of joins and subselects), a couple writes per call.

asterisk really doesn't do well with high latency reads or writes because it locks threads and creates basically artificial system load.  500ms of database latency means 500ms of high CPU load.  asterisk issue, can't be solved by me.

right now, limited to either 2 sites with master-master replication (native mysql) or more sites with circular replication (also native mysql) but I *hate* circular replication as a failed node kills replication.  splitting things to be 2 masters and multiple slaves only solves read latency by reading from a local slave but also add mysql-router to handle the split read/writes.

the obvious solution here is an async galera cluster.  My issue is that I can't find an answer to a glaring question. 

if there are 6 sites with 6 galera mysql instances, how much write latency is there in writing to a local mysql instance (site 1, writing to the local database)?  What I'm seeing is that I still will have latency added for the local node to update another node in the cluster.

remote sites could have 200ms of latency.  asterisk in this software stack gets very angry at just 40ms latency.

A top down view says that even a few seconds of latency between database servers isn't an issue. only if a site were to fail and sip phones were to have to re-register to a new asterisk would the few seconds even be perceivable and that's well within my needs.  Even data integrity of the remote writes isn't that big of a deal because asterisk will overwrite it in a short while anyway and it would just mean failover calling wouldn't work for 60 seconds on a single phone (as long as there were an authoritative database that 'wins' in any conflict automatically). 

The real need is solving the local reads which I think galeracluster does, but also solving the local write latency which needs to be far less than 40ms.

Any advice on the subject would be greatly appreciated.

Reply all
Reply to author
Forward
0 new messages