Search code examples
nginxmesosmarathon

Mesos/Marathon scalling a web application


I'm reading up and doing basic mesos/marathon installation. If Im deploying a webapp as a marathon application, the instance(s) of my webapp could run in any mesos slave. Howe would I then configure my nginx upstream to point to correct host(s).

Should my webapp register its host in zookeeper and reconfigure nginx periodically ?.

Is there any examples how to do this.

Thanks


Solution

  • Should my webapp register its host in zookeeper and reconfigure nginx periodically ?

    You don't need zookeeper. All data required to configure nginx are available in Mesos or Marathon. You can periodically query Mesos/Marathon and generate Nginx configuration like Nixy does.

    To minimize unavability time you can use Marathon SSE to get information about instances start/stop just like allegro/marathon-consul does.