0

we are using MariaDB 10.2 with Galera plugin. Cluster consists of 4 nodes - 3 are busy service complex queries and 1 is more for a backup.

Recently we came across ProxySQL and this sounds very interesting for us in terms of splitting insert queries to one server and selecting data from others. We are hoping to avoid deadlocks and autoincrement problems during high activity.

But one of our developers has discovered a delay - when using ProxySQL he tries to insert a simple record and do instant select of that record. In general every second or third such select-request fails due to latency. If he adds tiny 0.01s delay - he never gets failure, as all galera nodes are able to sync within this time.

Now the question is - is it possible to cache inserted data with ProxySQL, so instant "select" would be returned from the cache, at least for the first 0.01seconds.

Or are there any other ways or suggestions in this scenario?

Thank you. :)

0

Adding delay of 10 milliseconds before fetching a freshly inserted record solves the issue, and it has been implemented as a temporary fix, but I hope there is a prettier solution to it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.