Live data from Hacker News

Nginx Unit

nginx.com

11–20 of 236 posts

Re: Nginx Unit

#11
post #7

Also note github repo at https://github.com/nginx/unit

If you're unfamiliar, look at this instead.

The homepage on Nginx.com is basically

> Join this webinar to learn

> - What NGINX Unit does that has not been available before

Re: Nginx Unit

#12
post #6

Looks to be a good candidate to replace omnipresent nginx based API routers

I have a small flask application which basically is a rest get post API server. I'm struggling to make deployment easy. With PHP, i just push to the application server and rsync that folder into var www html for Apache httpd but what would I do for flask python 3?

Ansible? Puppet? A five line bash script?

Re: Nginx Unit

#14
post #6

Looks to be a good candidate to replace omnipresent nginx based API routers

I have a small flask application which basically is a rest get post API server. I'm struggling to make deployment easy. With PHP, i just push to the application server and rsync that folder into var www html for Apache httpd but what would I do for flask python 3?

Here will go their REST config api to force reloads.

BTW, it is a good idea to always do API versioning on production runs. That will eliminate the possibility that different API versions (files stuck in the cache, or simply people who kept browser open for a long time) use the same endpoint

Re: Nginx Unit

#15
post #6

Looks to be a good candidate to replace omnipresent nginx based API routers

I have a small flask application which basically is a rest get post API server. I'm struggling to make deployment easy. With PHP, i just push to the application server and rsync that folder into var www html for Apache httpd but what would I do for flask python 3?

Use a webserver that proxies requests to a wsgi server. We tend to put Caddy in front of Gunicorn which works really well. Also, look into running Gunicorn under supervisord.

Re: Nginx Unit

#16
So it looks like they basically rewrote uwsgi and slapped a rest api on top of it.. (as a big fan of uwsgi, that seems like a reasonable thing to do...)

Re: Nginx Unit

#17
I recently tried to deploy a python flask application, and it was quite a mess. It relied on some services I had never heard of, and the documentation was a mess (not the documentation of Flask but of how to deploy it properly).

If Nginx Unit could host flask applications, it would be great news.

Re: Nginx Unit

#18
post #16

So it looks like they basically rewrote uwsgi and slapped a rest api on top of it.. (as a big fan of uwsgi, that seems like a reasonable thing to do...)

badly need settings like restart works every X requests or harakiri after # seconds timeout.

Re: Nginx Unit

#20
post #15

Earlier quoted context omitted.

I have a small flask application which basically is a rest get post API server. I'm struggling to make deployment easy. With PHP, i just push to the application server and rsync that folder into var www html for Apache httpd but what would I do for flask python 3?

Use a webserver that proxies requests to a wsgi server. We tend to put Caddy in front of Gunicorn which works really well. Also, look into running Gunicorn under supervisord.

Oh, and also use Fabric - http://docs.fabfile.org/en/latest/
Post reply on HN