5 Commits

Author SHA1 Message Date
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Esa Korhonen
88b87aceb5 HintRouter: use a subfunction for connecting to backends
Also, removed needless runtime capabilities + other fixes according to
comments.
2017-03-29 11:13:03 +03:00
Esa Korhonen
526ba7d706 HintRouter: cleanup + statistics for diagnosis entrypoint
General code cleanup. Routing error detection now more robust.
Remove some unused code. Debug messages now use "unique_name" when
referring to servers.
2017-03-28 11:09:48 +03:00
Esa Korhonen
90c249a8b2 HintRouter: Support various hint types, round-robin rotate slaves
Supports hint types:
-master
-slave
-named server
-all

A default action, which is performed when no hint exists or on error,
can be set. The different actions are analogous to the hint types.

A maximum connection number for slaves can be set. If more slaves are
configured for the service, the filter will rotate slaves for new sessions.

Within a session with multiple slaves, the "route_to_slave"-hint will
also rotate among the slave backends.
2017-03-28 11:09:48 +03:00
Johan Wikman
7165b4306f Implement first version of HintRouter
The hintrouter is now in principle capable of routing requests
to the master or to some slave (in a round robin fashion) based
upon hints set by some earlier filter.

Note that as the router is completely oblivious of transaction
boundaries, using it with transactions and autocommit being off
will not make anyone happy.

Recognizing transaction boundaries using regexes and then pinning
the server until transaction commit would be needed.
2017-03-17 10:56:53 +02:00