[pgpool-committers: 4905] pgpool: Feature: allow to specify load balance weight ratio for load ba
Bo Peng
pengbo at sraoss.co.jp
Tue Aug 7 10:12:50 JST 2018
Feature: allow to specify load balance weight ratio for load balance parameters.
Add a new feature to allow to specify load balance weight ratio for
"database_redirect_preference_list" and "app_name_redirect_preference_list"
parameters.
You can specify the list of "database-name:node id(ratio)" pairs to
send SELECT queries to a particular backend node for a particular
database connection at a specified load balance ratio.
Also you can specify list of "application-name:node id(ratio)" pairs to
send SELECT queries to a particular backend node for a particular client
application connection at a specified load balance ratio.
This load balance ratio specifies a value between 0 and 1,
and the default is 1.0.
For example, by specifying "database_redirect_preference_list = 'test:1(0.5)'",
Pgpool-II will redirect 50% SELECT queries to the backend node of ID 1
for the connection to "test" database. And the other 50% SELECT queries
will be sent to other backend nodes.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=51080319f8d6ae063bd64e8265cab46196d0c913
Modified Files
--------------
doc.ja/src/sgml/loadbalance.sgml | 59 +++++++++++++---
doc/src/sgml/loadbalance.sgml | 52 ++++++++++----
src/include/utils/regex_array.h | 1 +
src/protocol/child.c | 82 ++++++++++++++++------
.../regression/tests/008.dbredirect/select.pgbench | 2 +-
.../tests/008.dbredirect/select1.pgbench | 1 +
src/test/regression/tests/008.dbredirect/test.sh | 64 ++++++++++++++---
src/utils/regex_array.c | 19 ++++-
8 files changed, 225 insertions(+), 55 deletions(-)
More information about the pgpool-committers
mailing list