skip to Main Content

Lets say I have 100 PostgreSQL nodes and one instance of pgpool-II.
Does a pgpool-II instance have a limit on concurrent connections?

I know PostgreSQL has a limit for connections, but I know the pgpool is load balancing too. Lets say I have 100 pg node, per node it has a limit of 100 concurrent users, if we calculated 100*100 nodes, that is 10,000 connections.

I want to know if pgpool has a connection limit based on that per pg node or pgpool itself.

If based on pgpool itself, will the pgpool watchdog promote a new pgpool instance if the pgpool connection limit is exceeded?

2

Answers


  1. One pgpool process can handle one client connection at a time.

    num_init_children will be proportional to the number of concurrent connections you want to have (if you want to have 10,000 concurrent connections through pgpool you need to have num_init_children = 10,000).

    Login or Signup to reply.
  2. Total connections that can be handled by postgres should be proportional to the number of incoming client connection requests. In pgpool
    The factors that we would need to consider are,
    In Pgpool,

    1. Num init children – The more the concurrent connections the more pre-forked processes you’d need to fulfill these requets. This number is directly proportional to the number of concurrent requets it c
    2. Max Pool Size – if you’d want to increase the number of concurrent connections in the system the max pool size must be increased.

    In Postgres

    1. Max Connections – The total number of client connection it can handle

    There’s a correlation b/w pgpool and postgres

    The total connections to postgres = (num init children * max pool size)

    By default num init children is 32 and max pool size is 15 , so that’s 480 , so pgpool can handle upto 480 connections to your backend nodes (postgres server), hence maxConnections should always be greater than (num init children * max pool size)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search