Skip to content

Increase fastapi workers#12784

Merged
mekarpeles merged 1 commit into
internetarchive:masterfrom
cdrini:cdrini/increase-fastapi-workers
May 26, 2026
Merged

Increase fastapi workers#12784
mekarpeles merged 1 commit into
internetarchive:masterfrom
cdrini:cdrini/increase-fastapi-workers

Conversation

@cdrini
Copy link
Copy Markdown
Collaborator

@cdrini cdrini commented May 21, 2026

As more traffic is being handled by fastapi, we're seeing it saturate more often than webpy. Adjust the number of workers to match:

image

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings May 21, 2026 15:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts Gunicorn worker allocation between the legacy web.py (web) service and the FastAPI (fast_web) service in the production Docker Compose overlay to better handle shifting traffic patterns toward FastAPI.

Changes:

  • Rebalances worker counts by decreasing web workers (28 → 25).
  • Increases fast_web workers (4 → 7) to reduce FastAPI saturation while keeping total workers constant.

Comment thread compose.production.yaml
hostname: "$HOSTNAME"
environment:
- GUNICORN_OPTS= --workers 28 --timeout 300 --max-requests 1500
- GUNICORN_OPTS= --workers 25 --timeout 300 --max-requests 1500
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do it, incredible.

@mekarpeles mekarpeles merged commit b7aa6be into internetarchive:master May 26, 2026
8 checks passed
@humansakhini-gif
Copy link
Copy Markdown

Thank you

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.

4 participants