title: Manage Database Connection Pool via Nginx/Haproxy
body: <p>We have multiple instances of a service. Also, we have more than one service sharing a same database.</p>
  
  <p>Currently, we are managing the connection pool in every service instance. 
  But, we see some issues as too many idle inactive connections are created and the backend db has limit on too many idle inactive connections.</p>
  
  <p>We are considering at using nginx/haproxy to manage database connection pool.</p>
  
  <p>I looked into haproxy/nginx docs but did not find anything relevant to what I am trying to accomplish.</p>
  
  <p>Has anyone tried implementing a similar solution uisng haproxy/nginx. If so can you please help me on that.</p>