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.
This commit is contained in:
Esa Korhonen
2017-03-27 10:07:51 +03:00
parent ddcd1f960c
commit 90c249a8b2
5 changed files with 377 additions and 93 deletions

View File

@ -13,6 +13,8 @@
*/
#include <maxscale/cppdefs.hh>
#include <maxscale/dcb.h>
#include <maxscale/log_manager.h>
#define DEBUG_HINTROUTER