When we started to develop Galera replication about 5 years ago, we faced a question of how to test it under load: we needed a fast, flexible and easy to use load balancer. Thus GLB project was born, explained in my "How Hard Could That Be?" old blog post (lost in site upgrade, but miraculously preserved by Wayback Machine).
It turned out that it was not that hard at all — it was
unsurmountable. Linux splice() function turned out
to be a joke and you still had to do at least 3 system calls per
packet: (e)poll(), read(), write() - 6 per SQL
request. And that's a lot of CPU. And a lot of latency.
And while it is not that much faster than pen or haproxy (insignificantly so for production purposes), glbd IS the fastest …
[Read more]