Reputation: 120
I'm planning to deploy my Flask services with Gunicorn WSGI Server. However I could not get one part. I have a main Flask app and that main app calls the other Flask apps. My main purpose for using Gunicorn is to handle the incoming multiple/simultaneous requests by Gunicorn workers. Do I have to implement a different Gunicorn Server for each of the Flask apps so that they will also have multiple workers in case of incoming simultaneous requests, or there is no need for that? Thanks in advance.
Upvotes: 0
Views: 639
Reputation: 436
When you implement the a single Flask server app with all of its endpoints, each gunicorn worker that is spawned for the app will be able to serve requests to all endpoints. You don't have to implement the same logic multiple times. Each endpoint can be served by multiple/all of the workers at the same time (unless you prevent it by yourself with locks etc..).
Upvotes: 0