nginx - Why use gunicorn with a reverse-proxy? -
from gunicorn's documentation:
deploying gunicorn
we recommend use gunicorn behind proxy server.
nginx configuration
although there many http proxies available, advise use nginx. if choose proxy server need make sure buffers slow clients when use default gunicorn workers. without buffering gunicorn susceptible denial-of-service attacks. can use slowloris check if proxy behaving properly.
why recommended use proxy server, , how buffering prevent dos attacks?
according nginx documentation, reverse proxy can used provide load balancing, provide web acceleration through caching or compressing inbound , outbound data, , provide layer of security intercepting requests headed back-end servers.
gunicorn designed application server sits behind reverse proxy server handles load balancing, caching, , preventing direct access internal resources.
by exposing gunicorn's synchronous workers directly internet, dos attack performed creating load trickles data servers, slowloris.
Comments
Post a Comment