feat(authentik): performance improvements and updates from prod - #447
Open
runleveldev wants to merge 1 commit into
Open
feat(authentik): performance improvements and updates from prod#447runleveldev wants to merge 1 commit into
runleveldev wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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
commandoptions (shared_buffers,max_connections). - Increases PgBouncer
MAX_CLIENT_CONNfrom 500 to 1000. - Bumps Authentik image tag to
2026.5.6and addsAUTHENTIK_POSTGRESQL__CONN_MAX_AGEplusAUTHENTIK_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
authentik/compose.ymlfile 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:
shared_buffersto 2GB and setmax_connectionsto 100 for improved database performance.MAX_CLIENT_CONNfor thepgbouncerservice from 500 to 1000, allowing more simultaneous client connections.Service Version Updates:
serverandworkerservices to use the newer Authentik image version2026.5.6instead of2026.5.4. [1] [2]Environment and Resource Configuration:
AUTHENTIK_POSTGRESQL__CONN_MAX_AGE: 0andAUTHENTIK_WEB__WORKERS: 4to theserverservice for better connection management and concurrency.AUTHENTIK_POSTGRESQL__CONN_MAX_AGE: 0to theworkerservice for consistent database connection handling.