1. 程式人生 > >Mesos+Zookeeper+Marathon的Docker管理平臺部署記錄(2)--負載均衡marathon-lb

Mesos+Zookeeper+Marathon的Docker管理平臺部署記錄(2)--負載均衡marathon-lb

[[email protected] ~]# docker ps
CONTAINER ID        IMAGE                              COMMAND                  CREATED             STATUS              PORTS                   NAMES
5acf0e5390dc        docker.io/nginx                    "nginx -g 'daemon off"   About an hour ago   Up About an hour    0.0.0.0:31380->80/tcp   mesos-92c601e1-3522-49f3-b030-9e0456aa19b9-S2.4ffe15aa-d840-443b-af6d-963a1680b792
39a89fe14869        docker.io/mesosphere/marathon-lb   "tini -g -- /marathon"   About an hour ago   Up About an hour                            mesos-92c601e1-3522-49f3-b030-9e0456aa19b9-S2.3bdc6abc-0eaa-47a6-b562-cfe436168b78

[
[email protected]
~]# docker exec -ti 39a89fe14869 /bin/bash [email protected]:/marathon-lb# cat haproxy.cfg ........ ........ frontend nginx_80 bind *:80 mode http use_backend nginx_80 frontend nginx2_80 bind *:80 mode http use_backend nginx2_80 backend nginx_80 balance roundrobin mode http option forwardfor http-request set-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto https if { ssl_fc } option httpchk GET / timeout check 20s server 182_48_115_237_31022 182.48.115.237:31022 check inter 60s fall 4 server 182_48_115_237_31277 182.48.115.237:31277 check inter 60s fall 4 backend nginx2_80 balance roundrobin mode http option forwardfor http-request set-header X-Forwarded-Port %[dst_port] http-request add-header X-Forwarded-Proto https if { ssl_fc } option httpchk GET / timeout check 20s server 182_48_115_237_31667 182.48.115.237:31667 check inter 60s fall 4 server 182_48_115_239_31380 182.48.115.239:31380 check inter 60s fall 4