Comments (4)
@anthonycorletti I had the time to rethink this and I concluded that gunicorn is still a good choice for CloudRun after all (and other systems as well), as long as the user has the option to deploy on CloudRun with multiple CPUs (and he is not utilizing them for multi-process work inside the server), gunicorn can have a great impact on performance.
So I guess the number of workers really depends on the number of CPUs the revision deployed with.
from cloudrun-fastapi.
great question! sebastian makes a great point and i would suggest deploying your container in the best way that suits your use case. for something like cloud run i think the approach of using a single uvicorn worker is fine. you could also just run one gunicorn-uvicorn worker. there is no particularly rigorous reason why ive done it this way. ive been using fastapi for a few years now so i might be a bit stuck in my ways haha. ill see if i have time to make some changes. open to pull requests if you'd like to make one for uvicorn deployment support!
from cloudrun-fastapi.
@H3zi lmk what you think of https://github.com/anthonycorletti/cloudrun-fastapi/tree/docker/single-uvicorn-worker-per-container/ hope it helps!
The more I think about it I definitely think it depends on your applications. If you don't want to rely on thread management directly through fastapi alone, gunicorn+uvicorn would be good to use.
from cloudrun-fastapi.
sounds cool! ill close this out.
from cloudrun-fastapi.
Related Issues (11)
- ModuleNotFoundError HOT 2
- Question about the Gunicorn config HOT 5
- View docs when cloud run service is on a custom domain HOT 1
- Add authorization example HOT 1
- Use Terraform to manage GCP infrastructure & integrate with builds
- Sending Emails with SendGrid HOT 1
- Login with Google and other OAuth Providers
- Authorization example for Scheduler jobs
- Cannot connect to local posgres HOT 1
- Cannot migrate to Cloud SQL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudrun-fastapi.