Should I have separate containers for Flask, uWSGI and nginx?

I intend to use Kubernetes and Ingress for load balancing. I am trying to learn how to configure Flask, uWSGI and Nginx. I see this tutorial in which all three are installed in one container, and I am wondering whether to use it or not. https://ianlondon.imtqy.com/blog/deploy-flask-docker-nginx/

I assume that their use in the form of separate containers and separate containers is that they can be scaled individually?

But also, should the box and uwsgi be in separate containers? (or Flask and Gunicorn, since uwsgi seems very similar to Gunicorn)

+4
source share
1 answer

Flask - -, , , WSGI . Flask, , . WSGI-, uWSGI, gunicorn mod_wsgi (mod_wsgi-express). - WSGI, , Flask , -.

-, nginx, . mod_wsgi - Apache . mod_wsgi-express , - -, nginx uWSGI gunicorn.

, , Kubernetes, nginx , , . , nginx , emptyDir, UNIX. UNIX INET nginx , , , , UNIX. uWSGI , INET nginx nginx , , .

nginx , - , . , , haproxy nginx, - . , , , nginx . uWSGI .

.

  • mod_wsgi-express. , , , uWSGI gunicorn.

  • WSGI , , . , Kubernetes , , , - , .

+9

Source: https://habr.com/ru/post/1679194/


All Articles