@@ -33,9 +33,9 @@ Illustrating the utility of haproxy as a load-balancer is best accomplished usin
3333 --cert example/client.crt --key example/client.key \
3434 --user client:cert \
3535 -H " Content-Type: application/json" \
36- -d ' {"name": "lb-frontend", "mode": "http "}' \
36+ -d ' {"name": "lb-frontend", "mode": "tcp "}' \
3737 " https://localhost:5556/v2/services/haproxy/configuration/frontends?version=1"
38- {" mode" :" http " ," name" :" lb-frontend" }
38+ {" mode" :" tcp " ," name" :" lb-frontend" }
3939 ` ` `
4040
41414. [Bind](https://www.haproxy.com/documentation/dataplaneapi/latest/# tag/Bind) the frontend configuration to `*:8085`:
@@ -68,9 +68,9 @@ Illustrating the utility of haproxy as a load-balancer is best accomplished usin
6868 --cert example/client.crt --key example/client.key \
6969 --user client:cert \
7070 -H " Content-Type: application/json" \
71- -d ' {"name": "lb-backend", "mode":"http ", "balance": {"algorithm":"roundrobin"}, "adv_check": "tcp-check"}' \
71+ -d ' {"name": "lb-backend", "mode":"tcp ", "balance": {"algorithm":"roundrobin"}, "adv_check": "tcp-check"}' \
7272 " https://localhost:5556/v2/services/haproxy/configuration/backends?version=3"
73- {" adv_check" :" tcp-check" ," balance" :{" algorithm" :" roundrobin" ," arguments" :null}," mode" :" http " ," name" :" lb-backend" }
73+ {" adv_check" :" tcp-check" ," balance" :{" algorithm" :" roundrobin" ," arguments" :null}," mode" :" tcp " ," name" :" lb-backend" }
7474 ` ` `
7575
76767. Update the frontend to use the backend:
@@ -81,9 +81,9 @@ Illustrating the utility of haproxy as a load-balancer is best accomplished usin
8181 --cert example/client.crt --key example/client.key \
8282 --user client:cert \
8383 -H " Content-Type: application/json" \
84- -d ' {"name": "lb-frontend", "mode": "http ", "default_backend": "lb-backend"}' \
84+ -d ' {"name": "lb-frontend", "mode": "tcp ", "default_backend": "lb-backend"}' \
8585 " https://localhost:5556/v2/services/haproxy/configuration/frontends/lb-frontend?version=4"
86- {" default_backend" :" lb-backend" ," mode" :" http " ," name" :" lb-frontend" }
86+ {" default_backend" :" lb-backend" ," mode" :" tcp " ," name" :" lb-frontend" }
8787 ` ` `
8888
89898. Run two simple web servers in detached mode named ` http1` and ` http2` :
0 commit comments