Giter Club home page Giter Club logo

docker-pgbouncer's Introduction

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest pgbouncer/manifest file.

What is PgBouncer?

PgBouncer is an open source lightweight connection pooler for PostgreSQL. Provides a low memory requirements (2K per connection by default) and several levels of brutality when rotating connections:

  • session pooling
  • statement pooling
  • transaction pooling

Supports:

  • online reconfiguration for most of the settings
  • restart/upgrade without dropping client connections
  • multi server backend, the destination databases can reside on different hosts

Caveats:

  • Since PgBouncer implements V3 protocol only, backend version must be >= 7.4.
  • Supported SQL features are limited within pooling modes

You can find more information about pgbouncer configuration and usage here

How to use this image

You can start a pgbouncer instance directly with official postgres image container link:

$ docker run --name certain-pgbouncer --link some-postgres:postgres -p 6432:6432 -d kafka/pgbouncer

or you can manually configure via special environment variables as follows:

docker run \
  -e "POSTGRES_PORT=tcp://127.0.0.1:5432" \
  -e "POSTGRES_ENV_POSTGRES_USER=postgres" \
  -e "POSTGRES_ENV_POSTGRES_DB=postgres" \
  -e "POSTGRES_ENV_POSTGRES_PASSWORD=mysecretpassword" \
  -p 6432:6432/tcp \
  -d --restart=always kafka/pgbouncer

By default pgbouncer instance binds to: 0.0.0.0:6432. You can change that and other behavior by providing optional environment variables.

Example

docker run \
  -e "listen_addr=0.0.0.0" \
  -e "listen_port=6432" \
  -e "pool_mode=session" \
  -e "default_pool_size=20" \
  -e "max_client_conn=100" \
  -p 6432:6432/tcp \
  -d --restart=always kafka/pgbouncer

As you can mention this example contains default values of parameters from pgbouncer config.

Supported Docker versions

This image is officially supported on Docker version 1.10.3.

Support for older versions (down to 1.6) is provided on a best-effort basis.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback

Issues

If you have any problems with or questions about this image, please contact through a GitHub issue.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; It is always thrilled to receive pull requests, and process them.

Before you start to code, it is recommend discussing your plans through a GitHub issue, especially for ambitious contributions.

docker-pgbouncer's People

Contributors

ofkindness avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

thefron

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.