mesosphere / marathon-lb

Marathon-lb is a service discovery & load balancing tool for DC/OS
Apache License 2.0
449 stars 300 forks source link

Multiple ports in HAPROXY_HTTP_FRONTEND_HEAD #555

Open artful88533 opened 6 years ago

artful88533 commented 6 years ago

Hello! Is it possible add multiple ports instead one in template HAPROXY_HTTP_FRONTEND_HEAD ? And gather all virtual hosts for each frontends. For example:

frontend marathon_http_in_1
  bind *:8001
  mode http
frontend marathon_http_in_2
  bind *:8002
  mode http
paambaati commented 6 years ago

@artful88533 You can bind the same frontend on multiple ports like this —

frontend marathon_http_in
  bind *:8001
  bind *:8002
  mode http

Does this work for your usecase?

artful88533 commented 6 years ago

Thanks for answer! @paambaati I want do some tests with HAProxy multiple process.

In global I added

        nbproc 2
        cpu-map 1 0
        cpu-map 2 1

Then I want add different frontends for each process. For example:

frontend marathon_http_in_1
  bind *:8001
  bind-process 1
  mode http
frontend marathon_http_in_2
  bind *:8002
  bind-process 2
  mode http

And I want gather all virtual hosts for each frontends. Is it possible?