osmarpb97 / pg_bouncer_railway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Railway PgBouncer Template

Deploy on Railway

This is a minimal PgBouncer image, based on Alpine Linux. Derived from https://github.com/edoburu/docker-pgbouncer

Features:

  • Very small, quick to pull (just 15MB)
  • Configurable using environment variables
  • Uses standard Postgres port 5432, to work transparently for applications.

Why use PgBouncer

PostgreSQL connections take up a lot of memory (about 10MB per connection). There is also a significant startup cost to establish a connection with TLS, hence web applications gain performance by using persistent connections.

By placing PgBouncer in between the web application and the actual PostgreSQL database, the memory and start-up costs are reduced. The web application can keep persistent connections to PgBouncer, while PgBouncer only keeps a few connections to the actual PostgreSQL server. It can reuse the same connection for multiple clients.

About

License:MIT License


Languages

Language:Shell 78.0%Language:Dockerfile 15.7%Language:Makefile 6.2%