Proxying and load balancing node.js
note: ab
is kinda broken on os x and needs some work-arounds.
$ ab -n 1000 -c 100 [-r] [url]
Type | Time taken (secs) | completed/failed | rps |
---|---|---|---|
single node http server | 0.2 | 1000/0 | 4995 |
node cluster w 4 workers | 0.3 | 1000/0 | 3301 |
nginx + single node http server | 0.21 | 1000/0 | 4367 |
nginx + node cluster w 4 workers | 0.34 | 1000/0 | 2914 |
- nginx simple proxy
- node cluster
- nginx + node cluster
- node as load balancer with node-http-proxy
- nginx, node and websockets (w/o redis)
- pm2 as lb
- add shared state to master in node cluster
- nginx passing headers
- chaos monkey and failover death by random timeout
- set pid, log files and proxy in config
- test config
nginx -t -c [absolute/path/to/config]
- run by config
nginx -c file -p prefix
MIT