4 ms·
I'm wondering what are the pros and cons of that vs this Years ago every website needed Apache or Nginx, then lately I've hardly used it at all... usually have
by anentropic 2y ago
I'm wondering what are the pros and cons of that vs this
Years ago every website needed Apache or Nginx, then lately I've hardly used it at all... usually have a container with gunicorn behind a load balancer that is part of the cloud platform
It's easy to see how to get Nginx Unit working, but not sure exactly how it fits into the utility picture vs other options
- teitoklien 2y agoNginx is a reverse proxy, it can work as the load balancer, the static asset server, a response caching server, an authorization server, HLS streaming server, etc. Nginx has a lot of usecases in one package, most larger companies and more technical workplaces, use Nginx or similar alternatives. Nginx Unit typically is meant for unifying the entire application space of multiple programming languages served by 1 Server (which also acts as a static server) So serving golang, python, php code and application all under 1 single wsgi/asgi application server called nginx unit and be able to dynamically change its routes with api calls too. This allows you to have 1 root process in a docker container to control your python fastapi or golang api processes, without needing 1 container for nginx and 1 container for Python/Golang process or a supervisord like init system controlling 2 or more processes inside 1 container Everything is under nginx unit and nginx unit is being triggered as the main process inside the container. Moreover it is also much much much more faster in terms of response time than most language dependent application servers like gunicorn/unicorn for python3, etc [1] [1](https://medium.com/@le_moment_it/nginx-unit-discover-and-benchmark-part-3-c38661194cd0 https://medium.com/@le_moment_it/nginx-unit-discover-and-ben...)
- attentive 2y agounit replaces gunicorn. It should also be much faster but you do your tests.