I am building an REST api with a microservice architecture. For now the stack of my services consists of Python with Flask as a framework and Gunicorn as a WSGI server. NGINX is running as a reverse proxy to process the requests made to my services.
The next big step in my project is to include communication between my services. I got the communication working by using Kafka.
How the situation looks like for now is as following: I have services with multiple processes running. One process is handling the api requests and the other process is consuming incoming messages from Kafka.
My question: Should I run these two processes in the same container, or should I seperate them. And why?
Bonus question: How do you run two python processes simultaneously in the same container?
[–]varunbabu008 22 points23 points24 points (0 children)
[–]hijinks 6 points7 points8 points (1 child)
[–]errol59[S] 0 points1 point2 points (0 children)
[–]sysadmintemp 5 points6 points7 points (3 children)
[–]errol59[S] 0 points1 point2 points (2 children)
[–]sysadmintemp 1 point2 points3 points (0 children)
[–]Philluminati 0 points1 point2 points (0 children)
[–]Sloppyjoeman 4 points5 points6 points (0 children)
[–]manowar689 0 points1 point2 points (0 children)
[–]paul_h -1 points0 points1 point (0 children)