Marathon can meet your requirement by set 1 instance of that service; if
you want to start it on special host, constraint will help. Refer to
Marathon's doc for the detail (https://mesosphere.github.io/marathon/docs/).



----
Da (Klaus), Ma (马达) | PMP® | Advisory Software Engineer
Platform OpenSource Technology, STG, IBM GCG
+86-10-8245 4084 | [email protected] | http://k82.me

On Tue, Feb 23, 2016 at 6:06 PM, Petr Novak <[email protected]> wrote:

> Hello,
> if I need to run single stateless instance or only a single leader doing a
> work at any given time. Something I would typically implement using Zoo
> Curator LeaderSelector. Can I use Marathon to ensure this without having to
> implement mutual exclusion myself? Let's assume that other parts of the
> architecture aren't designed well to support more running workers at a time.
>
> Currently we have a service which updates cache, it runs on one node and
> when it fails it is restarted and PID file is used to ensure single
> instance. Pretty naive implementation, possibly doesn;t work in all edge
> cases.
>
> If I would like to allow it to restart on any node in a cluster can I use
> Marathon to simplify the implementation or it warrants more involved
> implementation using Zoo. Does Mesos provide any other helpers to simplify
> this use case?
>
> Or is Marathon designed only to run stateless services which can possibly
> run in multiple instances?
>
> Many thanks,
> Petr
>
>
>

Reply via email to