Skip to content

feat(authentik): performance improvements and updates from prod - #447

Open
runleveldev wants to merge 1 commit into
mainfrom
authentik
Open

feat(authentik): performance improvements and updates from prod#447
runleveldev wants to merge 1 commit into
mainfrom
authentik

Conversation

@runleveldev

Copy link
Copy Markdown
Collaborator

This pull request updates the authentik/compose.yml file to optimize PostgreSQL and Authentik service configurations, improve scalability, and update the Authentik image version. The main changes focus on database performance tuning, increasing connection limits, and updating environment settings for better resource management.

Database and Connection Tuning:

  • Set PostgreSQL service command-line options to increase shared_buffers to 2GB and set max_connections to 100 for improved database performance.
  • Increased MAX_CLIENT_CONN for the pgbouncer service from 500 to 1000, allowing more simultaneous client connections.

Service Version Updates:

  • Updated the server and worker services to use the newer Authentik image version 2026.5.6 instead of 2026.5.4. [1] [2]

Environment and Resource Configuration:

  • Added AUTHENTIK_POSTGRESQL__CONN_MAX_AGE: 0 and AUTHENTIK_WEB__WORKERS: 4 to the server service for better connection management and concurrency.
  • Added AUTHENTIK_POSTGRESQL__CONN_MAX_AGE: 0 to the worker service for consistent database connection handling.

Copilot AI lite review requested due to automatic review settings August 11, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the authentik/compose.yml Docker Compose configuration to apply production-derived tuning to the PostgreSQL + PgBouncer stack and to bump the Authentik server/worker image tag.

Changes:

  • Adds PostgreSQL runtime tuning via command options (shared_buffers, max_connections).
  • Increases PgBouncer MAX_CLIENT_CONN from 500 to 1000.
  • Bumps Authentik image tag to 2026.5.6 and adds AUTHENTIK_POSTGRESQL__CONN_MAX_AGE plus AUTHENTIK_WEB__WORKERS.
Suppressed comments (2)

authentik/compose.yml:38

  • MAX_CLIENT_CONN is now a fixed value (1000). Since acceptable limits depend on host resources and upstream connection patterns, parameterize it so operators can tune per-environment without editing this file.
      MAX_CLIENT_CONN: 1000

authentik/compose.yml:60

  • AUTHENTIK_WEB__WORKERS is hard-coded to 4, but the optimal worker count depends on available CPU and memory. Use variable substitution so deployments can tune this per host.
      AUTHENTIK_WEB__WORKERS: 4

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread authentik/compose.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants