mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

Question - This project VS marathon-consul #39

Closed ghost closed 8 years ago

ghost commented 8 years ago

This is not an issue, but a question.

I am trying to wrap my head around why someone would use this mesos-consul bridge over the other project you have the marathon-consul bridge?

Is it simply for those that use mesos but do not use marathon?

ChrisAubuchon commented 8 years ago

Marathon-consul is specific to the Marathon framework. Mesos-consul registers services from all of the frameworks registered in Mesos.

ghost commented 8 years ago

ok thanks, so it would seem to me that using the mesos-consul bridge would be a better choice as this would cover all frameworks including marathon, chronos etc... is that correct?

ChrisAubuchon commented 8 years ago

The two projects have different targets. Marathon-consul stores the marathon task information in the Consul K/V store. The haproxy-consul project, for example, uses that data to generate the haproxy configuration. marathon.tmpl

Mesos-consul registers Mesos tasks as Consul services.

ghost commented 8 years ago

ok, but can't the haproxy-consul also use the consul services instead of the K/V store that is prefixed with marathon to generate haproxy config with consul.tmpl?

stevendborrelli commented 8 years ago

@sarlindo marathon-consul came about because mesos doesn't expose port information very well for service discovery. The new DiscoveryInfo protobufs added to mesos help here, but they are not widely used in frameworks yet.

We're moving towards using traefik talking directly to marathon for LB, and mesos-consul just got DiscoveryInfo support, so our use of both marathon-consul and haproxy-consul will be decreased.

ghost commented 8 years ago

@stevendborrelli traefix looks like an interesting project. In the mean time, assuming I am on the latest version of mesos (frameworks I use in mesos at the moment are marathon and chronos only). Would using mesos-consul in conjunction with haproxy-consul be a better option instead of using marathon-consul?

stevendborrelli commented 8 years ago

@sarlindo either one is fine to use. With our haproxy-consul container , you just have to change the HAPROXY_MODE environment variable before starting the container. Mesos-consul is a little easier, as it doesn't use the consul k/v or require an event subscription in Marathon.

ghost commented 8 years ago

@stevendborrelli Thanks.