Skip to content

Commit b4c7915

Browse files
committed
Revamp docs.
1 parent 4f3ec03 commit b4c7915

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

README.md

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1-
# docker-gunicorn-proxy
1+
# gunicorn-proxy
22

3-
It is highly recommended to put a reverse proxy in front of Gunicorn. This
4-
project provides a turnkey reverse proxy for gunicorn in a Docker environment.
3+
`gunicorn-proxy` is a turnkey reverse proxy for gunicorn in a Docker
4+
environment.
55

6-
The Gunicorn docs recommend nginx, but this project use HAProxy for the more
7-
robust proxy features. Notably, HAProxy offers request queuing, which we use
8-
for load shedding during times of excessive load. (nginx does have queuing
9-
functionality, but it's only available in the commercial version.)
6+
As well as being simple to set up, this has the additional benefit of load
7+
shedding. Under high load, the proxy will return 503 errors for a portion of
8+
requests. This allows the application to maintain acceptable response times
9+
for some requests and fail quickly for others. The proxy also allows health
10+
checks to skip the queue, so health checks will continue to succeed as long as
11+
the application continues to serve requests.
12+
13+
Although this project is entitled `gunicorn-proxy`, there are few
14+
gunicorn-specific features and this will most likely be effective for any
15+
HTTP-speaking application server.
1016

1117
## Getting Started
1218

1319
This project is available from Docker Hub as
1420
[luhn/gunicorn-proxy:0.2](https://hub.docker.com/r/luhn/gunicorn-proxy).
1521

16-
Get your gunicorn running in a container. Then run this project, using the
17-
`SERVER` environment variable to point it at your gunicorn container. For
18-
example, this might look like:
22+
Get your gunicorn running in a container. Then run this project, setting the
23+
`SERVER` environment variable to the hostname and port of your application and
24+
`CONCURRENCY` to the number of workers running. For example, this might look
25+
like:
1926

2027
```bash
2128
docker run --link gunicorn -e "SERVER=gunicorn:8080" -e "CONCURRENCY=4" luhn/gunicorn-proxy
2229
```
2330

24-
Set `CONCURRENCY` to the number of gunicorn workers you have.
25-
2631
## Configuration
2732

2833
The proxy is configured via environment variables.

0 commit comments

Comments
 (0)