undertheseanlp / underthesea

Underthesea - Vietnamese NLP Toolkit
http://undertheseanlp.com
GNU General Public License v3.0
1.37k stars 271 forks source link

Run underthesea service with nginx and Gunicorn #594

Closed rain1024 closed 1 year ago

rain1024 commented 1 year ago

Context (2022-11-13): In recent days, undertheseanlp.com is not stable. After running a few hours, it dead. I traced access logs and realize it has many weired requests. So I decide to run underthesea service with nginx and Gunicorn.

I follow these tutorial, it has a clear plan.

We will install and configure the Gunicorn application server. This will serve as an interface to our application, translating client requests in HTTP to Python calls that our application can process. We will then set up Nginx in front of Gunicorn to take advantage of its high performance connection handling mechanisms and its easy-to-implement security features.

Gunicorn

Gunicorn (‘Green Unicorn’) is a pure-Python WSGI server for UNIX.

Nginx

Nginx is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache