Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always run container with single Uvicorn process #503

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

grahamalama
Copy link
Contributor

@grahamalama grahamalama commented Jan 6, 2023

In this PR, we remove Gunicorn and run the container with a single process of Unvicorn in both development and production. See #494 for rationale of why we're making this change.

With removing Gunicorn, we also had to do some tweaking to our logging and application settings.

Closes #494

Previously, we'd run our application container with uvicorn in
development, but gunicorn with multiple processes in production. This
made the app a little more complex when it came to metrics collection,
and we have k8s to manage scaling. So, with this commit, we remove
gunicorn and now always run the application with a single process.
@grahamalama grahamalama added the dev Enhancements to development environment label Jan 6, 2023
@grahamalama grahamalama requested a review from a team as a code owner January 6, 2023 16:30
Copy link
Member

@bkochendorfer bkochendorfer left a comment

Choose a reason for hiding this comment

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

Seems cool, once this is in dev let's see if we need to change the minimum number of pods in your deployment to make up for the change here.

@grahamalama grahamalama merged commit aeb42dc into main Jan 10, 2023
@grahamalama grahamalama deleted the run-container-with-uvicorn branch January 10, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Enhancements to development environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run app as a single process in production
2 participants