# Goxy -- a go (reverse) proxy ## Goals - Listen for HTTP and HTTPS on public IP - Terminate SSL (SNI) - HTTP/2.0 out of the box - Proxy to backends (HTTP/1.1, wsgi, fcgi?) - Zero downtime (re-)configuration ## Configuration unit - Hostname(s) - Upstream(s) (Round-robin if many) - Optional TLS Certificate and Key ## Testing ab -n 10000 -c 1000 -H 'Host: gowiki.moccu' http://127.0.0.1/view/Home Concurrency Level: 1000 Time taken for tests: 1.694 seconds Complete requests: 10000 Failed requests: 0 Total transferred: 18130000 bytes HTML transferred: 16950000 bytes Requests per second: 5902.56 [#/sec] (mean) Time per request: 169.418 [ms] (mean) Time per request: 0.169 [ms] (mean, across all concurrent requests) Transfer rate: 10450.54 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 17 120.9 0 1001 Processing: 1 94 98.1 64 1009 Waiting: 1 93 98.1 64 1009 Total: 1 111 152.9 67 1132 ab -n 10000 -c 1000 http://gowiki.moccu/view/Home Concurrency Level: 1000 Time taken for tests: 1.590 seconds Complete requests: 10000 Failed requests: 0 Total transferred: 18130000 bytes HTML transferred: 16950000 bytes Requests per second: 6291.16 [#/sec] (mean) Time per request: 158.953 [ms] (mean) Time per request: 0.159 [ms] (mean, across all concurrent requests) Transfer rate: 11138.54 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 52 214.2 1 1005 Processing: 0 48 53.8 33 427 Waiting: 0 48 53.6 33 427 Total: 1 100 223.2 37 1424 ## Build'n'Run docker build -t goxy . docker run -d --name goxy -p 192.168.243.5:80:80 -p 192.168.243.5:443:443 --net testnet goxy ## Mapping ### Host scheme http://host/path -> http only https://host/path -> http redirect to https, cert required ws, wss -- ? ### Upstream scheme http://backend/path https://backend/path ws://backend/path wss://backend/path