|
1 | | -# haproxy-connect |
| 1 | +# HAProxy Connect |
2 | 2 |
|
3 | | -Haproxy connector for Consul Connect. (https://www.consul.io/docs/connect/index.html) |
| 3 | +[Consul Connect](https://www.consul.io/docs/connect/index.html) provides a simple way to setup service mesh between your services by offloading the load balancing logic to a sidecar process running alongside your application. It exposes a local port per service and takes care of forwarding the traffic to alives instances of the services your application wants to target. Additionnaly, the traffic is automatically encrypted using TLS, and can be restricted by using [intentions](https://www.consul.io/docs/connect/intentions.html) by selecting what services can or cannot call your application. |
| 4 | +[HAProxy](https://www.haproxy.org) is a proven load balancer widely used in the industry for its high performance and reliability. |
| 5 | +HAProxy Connect allows to use HAProxy as a load balancer for Consul Connect. |
4 | 6 |
|
5 | | -## Status |
| 7 | +## Architecture |
6 | 8 |
|
7 | | -This project is highly experimental and is not ready for production yet |
| 9 | +Three components are used : |
| 10 | +* HAProxy, the load balancer |
| 11 | +* Dataplane API, which provides a high level configuration interface for HAProxy |
| 12 | +* HAProxy Connect, that configures HAProxy through the Dataplane API with information pulled from Consul. |
| 13 | + |
| 14 | +To handle intentions, HAProxy Connect, sets up a SPOE filter on the application public frontend. On each connection HAProxy checks with HAProxy Connect that the incomming connection is authorized. HAProxy Connect parses the request certificates and in turn calls the Consul agent to know wether it should tell HAProxy to allow or deny the connection. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +## Requirements |
| 19 | + |
| 20 | +* HAProxy >= v1.9 (http://www.haproxy.org/) |
| 21 | +* DataplaneAPI >= v1.2 (https://www.haproxy.com/documentation/hapee/1-9r1/configuration/dataplaneapi/) |
8 | 22 |
|
9 | 23 | ## How to use |
10 | 24 |
|
11 | 25 | ``` |
12 | | -haproxy-connect -sidecar-for <your_service> |
| 26 | +haproxy-connect \ |
| 27 | + -sidecar-for <your-service-id> \ |
| 28 | + \ |
| 29 | + -enable-intentions # wether or not to enbale intentions \ |
| 30 | +
|
| 31 | + -haproxy-cfg-base-path <path> # base path to store haproxy config in, \ |
| 32 | + # will generate a unique directory per run under this, \ |
| 33 | + # defaults to /tmp \ |
| 34 | +
|
| 35 | +
|
| 36 | + -haproxy <haproxy binary path> # no required if in your path \ |
| 37 | + -dataplane <dataplane-api binary path> # no required if in your path \ |
13 | 38 | ``` |
0 commit comments