[Pgpool-general] About load balancing!!!

Erwan ebs at antelink.com
Fri May 20 16:06:05 UTC 2011


Hi Lazaro

On 05/20/2011 05:34 PM, Lazaro Rubén García Martinez wrote:
> Tatsuo, thank you very much for your answer, I read some topics about this and I found the answer. One question. Backend_weight is a probabilistic number from 0 to 1??

You can use any integers you want, then pgpool-II will compute the "load 
balancing" ratio for each of your backend nodes.

E.g: Imagine I have the following settings in my pgpool-II conf:
...
backend_hostname0 = 'node-main'
backend_port0 = 5432
backend_weight0 = 1000
backend_hostname1 = 'node-rescue'
backend_port1 = 5432
backend_weight1 = 1
...

After restarted pgpool-II, you will be able to check the "load 
balancing" ratio thanks to the pcp commands:

$ pcp_node_info 10 127.0.0.1 9898 login password 1
node-rescue 5432 1 0.000999
$ pcp_node_info 10 127.0.0.1 9898 login password 0
node-main 5432 2 0.999001

So here, 99% of the requests will be executed on 'node-main' 
(theoretically).

Hope this will help.
/Erwan


> Thank you very much for your time.
> Regards.
> ________________________________________
> De: Tatsuo Ishii [ishii at sraoss.co.jp]
> Enviado el: martes, 17 de mayo de 2011 4:50
> Para: Lazaro Rubén García Martinez
> CC: pgpool-general at pgfoundry.org
> Asunto: Re: [Pgpool-general] About load balancing!!!
>
> It's precisely explained in the pgpool-II document. Have you read it?
> Especially figures?
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
>> Hello every one in the list, Recently I need to make a presentation in my work about replication solutions for PostgreSQL, and I need to know how works the algoritms for making load balancing in Pgpool-II. This answer is very important for my.
>>
>> Thank you very much for your time.
>> Regards.
>> _______________________________________________
>> Pgpool-general mailing list
>> Pgpool-general at pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/pgpool-general
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general


More information about the Pgpool-general mailing list