https://github.com/commenthol/haproxy-examples
A collection of HAProxy examples
https://github.com/commenthol/haproxy-examples
Last synced: 17 days ago
JSON representation
A collection of HAProxy examples
- Host: GitHub
- URL: https://github.com/commenthol/haproxy-examples
- Owner: commenthol
- License: mit
- Created: 2015-10-14T18:43:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-07T20:53:59.000Z (over 8 years ago)
- Last Synced: 2025-01-09T11:39:49.883Z (over 1 year ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HAProxy Examples
> A collection of HAProxy examples
## Table of Contents
* [Prerequisites](#prerequisites)
* [Examples](#examples)
* [Loadbalancer](#loadbalancer)
* [Limit Connections and SessionRate](#limit-connections-and-sessionrate)
* [License](#license)
* [References](#references)
## Prerequisites
- HAProxy >=1.5.14
- node.js >=0.12
## Examples
### Loadbalancer
Source: [conf/loadbalance.cfg](conf/loadbalance.cfg)
The configuration sets up a HTTP loadbalancer with 3 configured backend servers, one of them in active standby
Run `make loadbalance` and access http://localhost:8888
### Limit Connections and SessionRate
Source: [conf/throttle.cfg](conf/throttle.cfg)
If it is desired to protect a backend with a dedicated session and connection rate use this recipe.
`throttle.conf` limits all incomming connections to only 5 concurrent requests being received at the backend. All other requests are immediately blocked with a 403 HTTP Response.
Run `make throttle` and access http://localhost:8888
## License
Copyright (c) 2016 commenthol (MIT License)
See [LICENSE][] for more info.
## References
* [HAProxy][HAProxy]
* [LICENSE][LICENSE]
[LICENSE]: ./LICENSE
[HAProxy]: http://www.haproxy.org/