[pgpool-hackers: 2651] Re: Pgpool-II 3.8: allow to specify load balance weight ratio for load balance parameters

Tatsuo Ishii ishii at sraoss.co.jp
Thu Dec 14 14:08:03 JST 2017


> Currently we can specify load balance condition by using,
> database_redirect_preference_list, and
> app_name_redirect_preference_list like:
> 
> postgres:primary
> 
> This means, if connected database is postgres, every SELECTs will be
> redirected to primary.
> 
> It would be nice if we could specify load balance ratio like:
> 
> postgres:primary(0.3)
> 
> which redirects 30% of SELECTs to primary (that is, other 70% of
> SELECTs will be redirected to the load balance node). If the primary
> node is also the load balance node, 100% of SELCTs will be redirected
> to the primary.
> 
> Other example is:
> 
> postgres:primary(0.0)
> 
> which never redirects SELECTs to the primary. This is useful if user
> never wants to redirect SELECTs on the primary. Actually we cannot do
> this for now if a primary node changes time to time.

Sorry I was wrong. This is possible today too by
"postgres:standby". What we cannot do today is
"postgres:primary(0.3)".

> postgres:mydb[0-4]:1(0.3)
> 
> which redirects 30% of SELECTs to node 1 (that is, other 70% of
> SELECTs will be redirected to the load balance node). If node 1 is
> also the load balance node, 100% of SELCTs will be redirected to node
> 1.
> 
> I suppose the new specification overrides the current "weight"
> parameters for each node.
> 
> Comments and suggestions are welcome.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list