-
I am trying to migrate my existing gunicorn config to granian.
Now I would like to move that into my Containerfile where I got:
Any ideas as to get a similar setup based on the number of cores? Should I approach this differently and write some kind of wrapper script? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@b3n4kh if you want to run those computation, you probably want to launch granian programmatically using a Python file (see for example #254). Given that you run the application in a container, I would keep processes/threads number low and use containers to scale your app. Also, if you keep the cli usage, the |
Beta Was this translation helpful? Give feedback.
-
Is there a feature similar to Or any other way to identify workers? |
Beta Was this translation helpful? Give feedback.
@b3n4kh if you want to run those computation, you probably want to launch granian programmatically using a Python file (see for example #254).
Given that you run the application in a container, I would keep processes/threads number low and use containers to scale your app.
This is generally what I suggest when running services using containers (eg: 1 proc and 2 blocking threads).
Also, if you keep the cli usage, the
CMD
line looks wrong, as there is nogranian run
command, but justgranian
.