You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Ankur Chauhan <an...@malloc64.com> on 2014/09/09 10:52:56 UTC
Frontend loadbalancer configuration for long running tasks
Hi all,
(Please let me know if this is not the correct place for such a question).
I have been looking at mesos + marathon + haproxy as a way of deploying
long running web applications. Mesos coupled with marathon's /tasks api
gives me all the information needed to get a haproxy configured and load
balancing all the tasks but it seems a little too simplistic.
I was wondering if there are other projects or if others could share how
they configure/reconfigure their loadbalancers when new tasks come alive.
Just to make things a little more concrete consider the following use case:
There are two web applications that are running as tasks on mesos:
1. webapp1 (http + https) on app1.domain.com
2. webapp2 (http + https) on app2.domain.com
We want to configure a HAProxy server that routes traffic from users (:80
and :443) and loadbalances it correctly onto the correct set of tasks.
Obviously there is some haproxy configuration happening here but i am
interested in finding out what others have been doing in similar cases
before I go around building yet another haproxy reconfigure and reload
script.
-- Ankur
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ankur Chauhan <an...@malloc64.com>.
holy guacamole! that's exactly what i was scribbling in my notebook just
now!
Thanks ryan!
-- Ankur
On Tue, Sep 9, 2014 at 1:56 AM, Ryan Thomas <r....@gmail.com> wrote:
> Hi Ankur,
>
> I saw this on the mesos subreddit not five minutes ago!
>
> http://www.qubitproducts.com/content/Opensourcing-Bamboo
>
> Cheers,
>
> Ryan
> On 9 Sep 2014 18:53, "Ankur Chauhan" <an...@malloc64.com> wrote:
>
>> Hi all,
>>
>> (Please let me know if this is not the correct place for such a question).
>> I have been looking at mesos + marathon + haproxy as a way of deploying
>> long running web applications. Mesos coupled with marathon's /tasks api
>> gives me all the information needed to get a haproxy configured and load
>> balancing all the tasks but it seems a little too simplistic.
>>
>> I was wondering if there are other projects or if others could share how
>> they configure/reconfigure their loadbalancers when new tasks come alive.
>>
>> Just to make things a little more concrete consider the following use
>> case:
>>
>> There are two web applications that are running as tasks on mesos:
>> 1. webapp1 (http + https) on app1.domain.com
>> 2. webapp2 (http + https) on app2.domain.com
>>
>> We want to configure a HAProxy server that routes traffic from users (:80
>> and :443) and loadbalances it correctly onto the correct set of tasks.
>> Obviously there is some haproxy configuration happening here but i am
>> interested in finding out what others have been doing in similar cases
>> before I go around building yet another haproxy reconfigure and reload
>> script.
>>
>> -- Ankur
>>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ryan Thomas <r....@gmail.com>.
Hi Ankur,
I saw this on the mesos subreddit not five minutes ago!
http://www.qubitproducts.com/content/Opensourcing-Bamboo
Cheers,
Ryan
On 9 Sep 2014 18:53, "Ankur Chauhan" <an...@malloc64.com> wrote:
> Hi all,
>
> (Please let me know if this is not the correct place for such a question).
> I have been looking at mesos + marathon + haproxy as a way of deploying
> long running web applications. Mesos coupled with marathon's /tasks api
> gives me all the information needed to get a haproxy configured and load
> balancing all the tasks but it seems a little too simplistic.
>
> I was wondering if there are other projects or if others could share how
> they configure/reconfigure their loadbalancers when new tasks come alive.
>
> Just to make things a little more concrete consider the following use case:
>
> There are two web applications that are running as tasks on mesos:
> 1. webapp1 (http + https) on app1.domain.com
> 2. webapp2 (http + https) on app2.domain.com
>
> We want to configure a HAProxy server that routes traffic from users (:80
> and :443) and loadbalances it correctly onto the correct set of tasks.
> Obviously there is some haproxy configuration happening here but i am
> interested in finding out what others have been doing in similar cases
> before I go around building yet another haproxy reconfigure and reload
> script.
>
> -- Ankur
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Jing Dong <ji...@qubitproducts.com>.
Hi,
Bamboo now supports both DNS and non-DNS flavoured proxy rules. It also
supports coming Marathon 0.7 release.
Feedback and contribution are welcomed!
Release log: https://github.com/QubitProducts/bamboo/releases/tag/v0.2.1
Thanks
Jing
On 17 September 2014 12:15, James Gray <za...@gmail.com> wrote:
> FWIW:
>
> We're using registrator[1] to register with Consul, consul-haproxy[2]
> to generate the haproxy config, and have written a simple rest-client
> for Consul for use inside our Java apps to find their dependencies via
> Consul. Previously, we were using Marathon, a custom haproxy
> generator script, and a simple rest-client for Marathon inside our
> Java apps.
>
> This does overcomplicate things somewhat though as now we have to pass
> the same healthcheck to both Marathon and Consul and there are more
> moving parts to hold this all together. We also have outstanding
> things to solve like how we ensure registrator (which we launch via
> Marathon) is always on every slave watching the docker socket.
>
> The motivation for this is that we're need to use Consul for the
> key-value store, need features like watches, distributed health
> checking etc
>
> I guess the ideal solution for us would to have Marathon tightly
> integrated with Consul though I am not sure how you're expose all the
> feature sets of both while it feeling like you're only interfacing
> with Marathon if that makes sense.
>
> [1] https://github.com/progrium/registrator
> [2] https://github.com/hashicorp/consul-haproxy
>
> On Tue, Sep 16, 2014 at 8:59 PM, Pablo Delgado <pa...@gmail.com> wrote:
> > Hi all,
> >
> > Take a look at https://github.com/opentable/mesoshub
> >
> > I am adding more documentation pretty soon.
> >
> > Cheers
> >
> > -Pablo
> >
> > On Fri, Sep 12, 2014 at 1:28 AM, Bart Spaans <ba...@opencredo.com>
> > wrote:
> >>
> >> Hi all,
> >>
> >> I was looking into yet more alternatives and was wondering if anyone has
> >> tried Smartstack [1] or Consul [2][3][4], and if they have any thoughts
> on
> >> it?
> >>
> >> Cheers,
> >> Bart
> >>
> >> [1] http://nerds.airbnb.com/smartstack-service-discovery-cloud/
> >> [2] http://www.consul.io/
> >> [3] https://www.hashicorp.com/blog/haproxy-with-consul.html
> >> [4] https://github.com/kelseyhightower/confd
> >>
> >> On 11 September 2014 20:24, Thomas Petr <tp...@hubspot.com> wrote:
> >>>
> >>> Gotcha, yep, Baragon could definitely use more documentation. I'll work
> >>> on putting together some deployment docs. Don't hesitate to ping the
> >>> Singularity mailing list for specific questions in the meantime.
> >>>
> >>> On Thu, Sep 11, 2014 at 2:02 PM, Ankur Chauhan <an...@malloc64.com>
> >>> wrote:
> >>>>
> >>>> Hi Tom,
> >>>>
> >>>> I looked at singularity some days ago and I was trying to setup
> Baragon
> >>>> and that was the place where I couldn't figure out stuff. It seemed
> like it
> >>>> was the right project and I could spend some time digging through the
> code
> >>>> to figure it out but a getting started guide for baragon and
> deployment
> >>>> guide were the things that would have helped me. The overall
> description
> >>>> gave me a good idea (which i like) but I needed a little more of a
> "how do
> >>>> i deploy this correctly and use it in prod" documentation.
> >>>>
> >>>> Thanks for pointing out the mailing list. I am still learning so I'll
> >>>> use that.
> >>>>
> >>>> -- Ankur
> >>>>
> >>>> On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com>
> wrote:
> >>>>>
> >>>>> Hey Ankur!
> >>>>>
> >>>>> When was the last time you looked at Singularity? We spent some time
> >>>>> last month improving our docs in anticipation for MesosCon, and
> we're always
> >>>>> open to feedback on what could be improved.
> >>>>>
> >>>>> We're using a combination of Singularity and Baragon to host web
> >>>>> services. We use Nginx for load balancing (behind Amazon ELBs) but
> Baragon
> >>>>> isn't tied to a specific type of load balancer, so it should be
> pretty easy
> >>>>> to make it work with HAProxy. Feel free to email me, or the
> Singularity
> >>>>> mailing list (singularity-users@googlegroups.com) if you have any
> questions.
> >>>>> I'd be interested to see if this solution works for you!
> >>>>>
> >>>>> Thanks,
> >>>>> Tom
> >>>>>
> >>>>> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com>
> >>>>> wrote:
> >>>>>>
> >>>>>> I looked around a bit but the docs on aurora are almost non-existant
> >>>>>> when you go into anything more that the basics. Singularity was
> another
> >>>>>> project that caught my eye but again lack of docs make it difficult
> to get
> >>>>>> started.
> >>>>>>
> >>>>>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb
> >>>>>> <st...@dev.static-void.de> wrote:
> >>>>>>>
> >>>>>>> Hi everybody,
> >>>>>>>
> >>>>>>> Ankur's post is general enough, allowing me to reiterate the
> >>>>>>> question:
> >>>>>>>
> >>>>>>> Does anyone know about similar HAProxy solutions for Aurora?
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>> Stephan
> >>>>>>>
> >>>>>>>
> >>>>>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
> >>>>>>> > Hi all,
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > (Please let me know if this is not the correct place for such a
> >>>>>>> > question).
> >>>>>>> > I have been looking at mesos + marathon + haproxy as a way of
> >>>>>>> > deploying long running web applications. Mesos coupled with
> >>>>>>> > marathon's /tasks api gives me all the information needed to get
> a
> >>>>>>> > haproxy configured and load balancing all the tasks but it seems
> a
> >>>>>>> > little too simplistic.
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > I was wondering if there are other projects or if others could
> >>>>>>> > share
> >>>>>>> > how they configure/reconfigure their loadbalancers when new tasks
> >>>>>>> > come
> >>>>>>> > alive.
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > Just to make things a little more concrete consider the following
> >>>>>>> > use
> >>>>>>> > case:
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > There are two web applications that are running as tasks on
> mesos:
> >>>>>>> > 1. webapp1 (http + https) on app1.domain.com
> >>>>>>> > 2. webapp2 (http + https) on app2.domain.com
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > We want to configure a HAProxy server that routes traffic from
> >>>>>>> > users
> >>>>>>> > (:80 and :443) and loadbalances it correctly onto the correct set
> >>>>>>> > of
> >>>>>>> > tasks. Obviously there is some haproxy configuration happening
> here
> >>>>>>> > but i am interested in finding out what others have been doing in
> >>>>>>> > similar cases before I go around building yet another haproxy
> >>>>>>> > reconfigure and reload script.
> >>>>>>> >
> >>>>>>> >
> >>>>>>> > -- Ankur
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >>
> >> Bart Spaans
> >> Consultant
> >> OpenCredo Ltd -- Excellence in Enterprise Application Development
> >>
> >> Mobile: +44(0) 7453 777 558
> >>
> >> Registered Office: 5-11 Lavington St., London SE1 0NZ
> >> Registered in UK. No 3943999
> >>
> >> If you have received this e-mail in error please accept our apologies,
> >> destroy it immediately and it would be greatly appreciated if you
> notified
> >> the sender. It is your responsibility to protect your system from
> viruses
> >> and any other harmful code or device. We try to eliminate them from
> e-mails
> >> and attachments; but we accept no liability for any that remain. We may
> >> monitor or access any or all e-mails sent to us.
> >
> >
>
--
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it has gone to
the wrong person. Thanks.
Re: Frontend loadbalancer configuration for long running tasks
Posted by James Gray <za...@gmail.com>.
FWIW:
We're using registrator[1] to register with Consul, consul-haproxy[2]
to generate the haproxy config, and have written a simple rest-client
for Consul for use inside our Java apps to find their dependencies via
Consul. Previously, we were using Marathon, a custom haproxy
generator script, and a simple rest-client for Marathon inside our
Java apps.
This does overcomplicate things somewhat though as now we have to pass
the same healthcheck to both Marathon and Consul and there are more
moving parts to hold this all together. We also have outstanding
things to solve like how we ensure registrator (which we launch via
Marathon) is always on every slave watching the docker socket.
The motivation for this is that we're need to use Consul for the
key-value store, need features like watches, distributed health
checking etc
I guess the ideal solution for us would to have Marathon tightly
integrated with Consul though I am not sure how you're expose all the
feature sets of both while it feeling like you're only interfacing
with Marathon if that makes sense.
[1] https://github.com/progrium/registrator
[2] https://github.com/hashicorp/consul-haproxy
On Tue, Sep 16, 2014 at 8:59 PM, Pablo Delgado <pa...@gmail.com> wrote:
> Hi all,
>
> Take a look at https://github.com/opentable/mesoshub
>
> I am adding more documentation pretty soon.
>
> Cheers
>
> -Pablo
>
> On Fri, Sep 12, 2014 at 1:28 AM, Bart Spaans <ba...@opencredo.com>
> wrote:
>>
>> Hi all,
>>
>> I was looking into yet more alternatives and was wondering if anyone has
>> tried Smartstack [1] or Consul [2][3][4], and if they have any thoughts on
>> it?
>>
>> Cheers,
>> Bart
>>
>> [1] http://nerds.airbnb.com/smartstack-service-discovery-cloud/
>> [2] http://www.consul.io/
>> [3] https://www.hashicorp.com/blog/haproxy-with-consul.html
>> [4] https://github.com/kelseyhightower/confd
>>
>> On 11 September 2014 20:24, Thomas Petr <tp...@hubspot.com> wrote:
>>>
>>> Gotcha, yep, Baragon could definitely use more documentation. I'll work
>>> on putting together some deployment docs. Don't hesitate to ping the
>>> Singularity mailing list for specific questions in the meantime.
>>>
>>> On Thu, Sep 11, 2014 at 2:02 PM, Ankur Chauhan <an...@malloc64.com>
>>> wrote:
>>>>
>>>> Hi Tom,
>>>>
>>>> I looked at singularity some days ago and I was trying to setup Baragon
>>>> and that was the place where I couldn't figure out stuff. It seemed like it
>>>> was the right project and I could spend some time digging through the code
>>>> to figure it out but a getting started guide for baragon and deployment
>>>> guide were the things that would have helped me. The overall description
>>>> gave me a good idea (which i like) but I needed a little more of a "how do
>>>> i deploy this correctly and use it in prod" documentation.
>>>>
>>>> Thanks for pointing out the mailing list. I am still learning so I'll
>>>> use that.
>>>>
>>>> -- Ankur
>>>>
>>>> On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com> wrote:
>>>>>
>>>>> Hey Ankur!
>>>>>
>>>>> When was the last time you looked at Singularity? We spent some time
>>>>> last month improving our docs in anticipation for MesosCon, and we're always
>>>>> open to feedback on what could be improved.
>>>>>
>>>>> We're using a combination of Singularity and Baragon to host web
>>>>> services. We use Nginx for load balancing (behind Amazon ELBs) but Baragon
>>>>> isn't tied to a specific type of load balancer, so it should be pretty easy
>>>>> to make it work with HAProxy. Feel free to email me, or the Singularity
>>>>> mailing list (singularity-users@googlegroups.com) if you have any questions.
>>>>> I'd be interested to see if this solution works for you!
>>>>>
>>>>> Thanks,
>>>>> Tom
>>>>>
>>>>> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com>
>>>>> wrote:
>>>>>>
>>>>>> I looked around a bit but the docs on aurora are almost non-existant
>>>>>> when you go into anything more that the basics. Singularity was another
>>>>>> project that caught my eye but again lack of docs make it difficult to get
>>>>>> started.
>>>>>>
>>>>>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb
>>>>>> <st...@dev.static-void.de> wrote:
>>>>>>>
>>>>>>> Hi everybody,
>>>>>>>
>>>>>>> Ankur's post is general enough, allowing me to reiterate the
>>>>>>> question:
>>>>>>>
>>>>>>> Does anyone know about similar HAProxy solutions for Aurora?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Stephan
>>>>>>>
>>>>>>>
>>>>>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>>>>>>> > Hi all,
>>>>>>> >
>>>>>>> >
>>>>>>> > (Please let me know if this is not the correct place for such a
>>>>>>> > question).
>>>>>>> > I have been looking at mesos + marathon + haproxy as a way of
>>>>>>> > deploying long running web applications. Mesos coupled with
>>>>>>> > marathon's /tasks api gives me all the information needed to get a
>>>>>>> > haproxy configured and load balancing all the tasks but it seems a
>>>>>>> > little too simplistic.
>>>>>>> >
>>>>>>> >
>>>>>>> > I was wondering if there are other projects or if others could
>>>>>>> > share
>>>>>>> > how they configure/reconfigure their loadbalancers when new tasks
>>>>>>> > come
>>>>>>> > alive.
>>>>>>> >
>>>>>>> >
>>>>>>> > Just to make things a little more concrete consider the following
>>>>>>> > use
>>>>>>> > case:
>>>>>>> >
>>>>>>> >
>>>>>>> > There are two web applications that are running as tasks on mesos:
>>>>>>> > 1. webapp1 (http + https) on app1.domain.com
>>>>>>> > 2. webapp2 (http + https) on app2.domain.com
>>>>>>> >
>>>>>>> >
>>>>>>> > We want to configure a HAProxy server that routes traffic from
>>>>>>> > users
>>>>>>> > (:80 and :443) and loadbalances it correctly onto the correct set
>>>>>>> > of
>>>>>>> > tasks. Obviously there is some haproxy configuration happening here
>>>>>>> > but i am interested in finding out what others have been doing in
>>>>>>> > similar cases before I go around building yet another haproxy
>>>>>>> > reconfigure and reload script.
>>>>>>> >
>>>>>>> >
>>>>>>> > -- Ankur
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>>
>> --
>>
>> Bart Spaans
>> Consultant
>> OpenCredo Ltd -- Excellence in Enterprise Application Development
>>
>> Mobile: +44(0) 7453 777 558
>>
>> Registered Office: 5-11 Lavington St., London SE1 0NZ
>> Registered in UK. No 3943999
>>
>> If you have received this e-mail in error please accept our apologies,
>> destroy it immediately and it would be greatly appreciated if you notified
>> the sender. It is your responsibility to protect your system from viruses
>> and any other harmful code or device. We try to eliminate them from e-mails
>> and attachments; but we accept no liability for any that remain. We may
>> monitor or access any or all e-mails sent to us.
>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Pablo Delgado <pa...@gmail.com>.
Hi all,
Take a look at https://github.com/opentable/mesoshub
I am adding more documentation pretty soon.
Cheers
-Pablo
On Fri, Sep 12, 2014 at 1:28 AM, Bart Spaans <ba...@opencredo.com>
wrote:
> Hi all,
>
> I was looking into yet more alternatives and was wondering if anyone has
> tried Smartstack [1] or Consul [2][3][4], and if they have any thoughts on
> it?
>
> Cheers,
> Bart
>
> [1] http://nerds.airbnb.com/smartstack-service-discovery-cloud/
> [2] http://www.consul.io/
> [3] https://www.hashicorp.com/blog/haproxy-with-consul.html
> [4] https://github.com/kelseyhightower/confd
>
> On 11 September 2014 20:24, Thomas Petr <tp...@hubspot.com> wrote:
>
>> Gotcha, yep, Baragon could definitely use more documentation. I'll work
>> on putting together some deployment docs. Don't hesitate to ping the
>> Singularity mailing list for specific questions in the meantime.
>>
>> On Thu, Sep 11, 2014 at 2:02 PM, Ankur Chauhan <an...@malloc64.com>
>> wrote:
>>
>>> Hi Tom,
>>>
>>> I looked at singularity some days ago and I was trying to setup Baragon
>>> and that was the place where I couldn't figure out stuff. It seemed like it
>>> was the right project and I could spend some time digging through the code
>>> to figure it out but a getting started guide for baragon and deployment
>>> guide were the things that would have helped me. The overall description
>>> gave me a good idea (which i like) but I needed a little more of a "how do
>>> i deploy this correctly and use it in prod" documentation.
>>>
>>> Thanks for pointing out the mailing list. I am still learning so I'll
>>> use that.
>>>
>>> -- Ankur
>>>
>>> On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com> wrote:
>>>
>>>> Hey Ankur!
>>>>
>>>> When was the last time you looked at Singularity? We spent some time
>>>> last month improving our docs
>>>> <https://github.com/HubSpot/Singularity/blob/master/README.md> in
>>>> anticipation for MesosCon, and we're always open to feedback on what could
>>>> be improved.
>>>>
>>>> We're using a combination of Singularity
>>>> <https://github.com/HubSpot/Singularity> and Baragon
>>>> <https://github.com/hubspot/baragon> to host web services. We use
>>>> Nginx for load balancing (behind Amazon ELBs) but Baragon isn't tied to a
>>>> specific type of load balancer, so it should be pretty easy to make it work
>>>> with HAProxy. Feel free to email me, or the Singularity mailing list (
>>>> singularity-users@googlegroups.com) if you have any questions. I'd be
>>>> interested to see if this solution works for you!
>>>>
>>>> Thanks,
>>>> Tom
>>>>
>>>> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com>
>>>> wrote:
>>>>
>>>>> I looked around a bit but the docs on aurora are almost non-existant
>>>>> when you go into anything more that the basics. Singularity was another
>>>>> project that caught my eye but again lack of docs make it difficult to get
>>>>> started.
>>>>>
>>>>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <
>>>>> stephan@dev.static-void.de> wrote:
>>>>>
>>>>>> Hi everybody,
>>>>>>
>>>>>> Ankur's post is general enough, allowing me to reiterate the question:
>>>>>>
>>>>>> Does anyone know about similar HAProxy solutions for Aurora?
>>>>>>
>>>>>> Thanks,
>>>>>> Stephan
>>>>>>
>>>>>>
>>>>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>>>>>> > Hi all,
>>>>>> >
>>>>>> >
>>>>>> > (Please let me know if this is not the correct place for such a
>>>>>> > question).
>>>>>> > I have been looking at mesos + marathon + haproxy as a way of
>>>>>> > deploying long running web applications. Mesos coupled with
>>>>>> > marathon's /tasks api gives me all the information needed to get a
>>>>>> > haproxy configured and load balancing all the tasks but it seems a
>>>>>> > little too simplistic.
>>>>>> >
>>>>>> >
>>>>>> > I was wondering if there are other projects or if others could share
>>>>>> > how they configure/reconfigure their loadbalancers when new tasks
>>>>>> come
>>>>>> > alive.
>>>>>> >
>>>>>> >
>>>>>> > Just to make things a little more concrete consider the following
>>>>>> use
>>>>>> > case:
>>>>>> >
>>>>>> >
>>>>>> > There are two web applications that are running as tasks on mesos:
>>>>>> > 1. webapp1 (http + https) on app1.domain.com
>>>>>> > 2. webapp2 (http + https) on app2.domain.com
>>>>>> >
>>>>>> >
>>>>>> > We want to configure a HAProxy server that routes traffic from users
>>>>>> > (:80 and :443) and loadbalances it correctly onto the correct set of
>>>>>> > tasks. Obviously there is some haproxy configuration happening here
>>>>>> > but i am interested in finding out what others have been doing in
>>>>>> > similar cases before I go around building yet another haproxy
>>>>>> > reconfigure and reload script.
>>>>>> >
>>>>>> >
>>>>>> > -- Ankur
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> --
>
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies,
> destroy it immediately and it would be greatly appreciated if you notified
> the sender. It is your responsibility to protect your system from viruses
> and any other harmful code or device. We try to eliminate them from
> e-mails and attachments; but we accept no liability for any that remain. We
> may monitor or access any or all e-mails sent to us.
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Bart Spaans <ba...@opencredo.com>.
Hi all,
I was looking into yet more alternatives and was wondering if anyone has
tried Smartstack [1] or Consul [2][3][4], and if they have any thoughts on
it?
Cheers,
Bart
[1] http://nerds.airbnb.com/smartstack-service-discovery-cloud/
[2] http://www.consul.io/
[3] https://www.hashicorp.com/blog/haproxy-with-consul.html
[4] https://github.com/kelseyhightower/confd
On 11 September 2014 20:24, Thomas Petr <tp...@hubspot.com> wrote:
> Gotcha, yep, Baragon could definitely use more documentation. I'll work on
> putting together some deployment docs. Don't hesitate to ping the
> Singularity mailing list for specific questions in the meantime.
>
> On Thu, Sep 11, 2014 at 2:02 PM, Ankur Chauhan <an...@malloc64.com> wrote:
>
>> Hi Tom,
>>
>> I looked at singularity some days ago and I was trying to setup Baragon
>> and that was the place where I couldn't figure out stuff. It seemed like it
>> was the right project and I could spend some time digging through the code
>> to figure it out but a getting started guide for baragon and deployment
>> guide were the things that would have helped me. The overall description
>> gave me a good idea (which i like) but I needed a little more of a "how do
>> i deploy this correctly and use it in prod" documentation.
>>
>> Thanks for pointing out the mailing list. I am still learning so I'll use
>> that.
>>
>> -- Ankur
>>
>> On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com> wrote:
>>
>>> Hey Ankur!
>>>
>>> When was the last time you looked at Singularity? We spent some time
>>> last month improving our docs
>>> <https://github.com/HubSpot/Singularity/blob/master/README.md> in
>>> anticipation for MesosCon, and we're always open to feedback on what could
>>> be improved.
>>>
>>> We're using a combination of Singularity
>>> <https://github.com/HubSpot/Singularity> and Baragon
>>> <https://github.com/hubspot/baragon> to host web services. We use Nginx
>>> for load balancing (behind Amazon ELBs) but Baragon isn't tied to a
>>> specific type of load balancer, so it should be pretty easy to make it work
>>> with HAProxy. Feel free to email me, or the Singularity mailing list (
>>> singularity-users@googlegroups.com) if you have any questions. I'd be
>>> interested to see if this solution works for you!
>>>
>>> Thanks,
>>> Tom
>>>
>>> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com>
>>> wrote:
>>>
>>>> I looked around a bit but the docs on aurora are almost non-existant
>>>> when you go into anything more that the basics. Singularity was another
>>>> project that caught my eye but again lack of docs make it difficult to get
>>>> started.
>>>>
>>>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <
>>>> stephan@dev.static-void.de> wrote:
>>>>
>>>>> Hi everybody,
>>>>>
>>>>> Ankur's post is general enough, allowing me to reiterate the question:
>>>>>
>>>>> Does anyone know about similar HAProxy solutions for Aurora?
>>>>>
>>>>> Thanks,
>>>>> Stephan
>>>>>
>>>>>
>>>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>>>>> > Hi all,
>>>>> >
>>>>> >
>>>>> > (Please let me know if this is not the correct place for such a
>>>>> > question).
>>>>> > I have been looking at mesos + marathon + haproxy as a way of
>>>>> > deploying long running web applications. Mesos coupled with
>>>>> > marathon's /tasks api gives me all the information needed to get a
>>>>> > haproxy configured and load balancing all the tasks but it seems a
>>>>> > little too simplistic.
>>>>> >
>>>>> >
>>>>> > I was wondering if there are other projects or if others could share
>>>>> > how they configure/reconfigure their loadbalancers when new tasks
>>>>> come
>>>>> > alive.
>>>>> >
>>>>> >
>>>>> > Just to make things a little more concrete consider the following use
>>>>> > case:
>>>>> >
>>>>> >
>>>>> > There are two web applications that are running as tasks on mesos:
>>>>> > 1. webapp1 (http + https) on app1.domain.com
>>>>> > 2. webapp2 (http + https) on app2.domain.com
>>>>> >
>>>>> >
>>>>> > We want to configure a HAProxy server that routes traffic from users
>>>>> > (:80 and :443) and loadbalances it correctly onto the correct set of
>>>>> > tasks. Obviously there is some haproxy configuration happening here
>>>>> > but i am interested in finding out what others have been doing in
>>>>> > similar cases before I go around building yet another haproxy
>>>>> > reconfigure and reload script.
>>>>> >
>>>>> >
>>>>> > -- Ankur
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
--
Bart Spaans
Consultant
OpenCredo Ltd -- Excellence in Enterprise Application Development
Mobile: +44(0) 7453 777 558
Registered Office: 5-11 Lavington St., London SE1 0NZ
Registered in UK. No 3943999
If you have received this e-mail in error please accept our apologies,
destroy it immediately and it would be greatly appreciated if you notified
the sender. It is your responsibility to protect your system from viruses
and any other harmful code or device. We try to eliminate them from
e-mails and attachments; but we accept no liability for any that remain. We
may monitor or access any or all e-mails sent to us.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Thomas Petr <tp...@hubspot.com>.
Gotcha, yep, Baragon could definitely use more documentation. I'll work on
putting together some deployment docs. Don't hesitate to ping the
Singularity mailing list for specific questions in the meantime.
On Thu, Sep 11, 2014 at 2:02 PM, Ankur Chauhan <an...@malloc64.com> wrote:
> Hi Tom,
>
> I looked at singularity some days ago and I was trying to setup Baragon
> and that was the place where I couldn't figure out stuff. It seemed like it
> was the right project and I could spend some time digging through the code
> to figure it out but a getting started guide for baragon and deployment
> guide were the things that would have helped me. The overall description
> gave me a good idea (which i like) but I needed a little more of a "how do
> i deploy this correctly and use it in prod" documentation.
>
> Thanks for pointing out the mailing list. I am still learning so I'll use
> that.
>
> -- Ankur
>
> On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com> wrote:
>
>> Hey Ankur!
>>
>> When was the last time you looked at Singularity? We spent some time last
>> month improving our docs
>> <https://github.com/HubSpot/Singularity/blob/master/README.md> in
>> anticipation for MesosCon, and we're always open to feedback on what could
>> be improved.
>>
>> We're using a combination of Singularity
>> <https://github.com/HubSpot/Singularity> and Baragon
>> <https://github.com/hubspot/baragon> to host web services. We use Nginx
>> for load balancing (behind Amazon ELBs) but Baragon isn't tied to a
>> specific type of load balancer, so it should be pretty easy to make it work
>> with HAProxy. Feel free to email me, or the Singularity mailing list (
>> singularity-users@googlegroups.com) if you have any questions. I'd be
>> interested to see if this solution works for you!
>>
>> Thanks,
>> Tom
>>
>> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com>
>> wrote:
>>
>>> I looked around a bit but the docs on aurora are almost non-existant
>>> when you go into anything more that the basics. Singularity was another
>>> project that caught my eye but again lack of docs make it difficult to get
>>> started.
>>>
>>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <
>>> stephan@dev.static-void.de> wrote:
>>>
>>>> Hi everybody,
>>>>
>>>> Ankur's post is general enough, allowing me to reiterate the question:
>>>>
>>>> Does anyone know about similar HAProxy solutions for Aurora?
>>>>
>>>> Thanks,
>>>> Stephan
>>>>
>>>>
>>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>>>> > Hi all,
>>>> >
>>>> >
>>>> > (Please let me know if this is not the correct place for such a
>>>> > question).
>>>> > I have been looking at mesos + marathon + haproxy as a way of
>>>> > deploying long running web applications. Mesos coupled with
>>>> > marathon's /tasks api gives me all the information needed to get a
>>>> > haproxy configured and load balancing all the tasks but it seems a
>>>> > little too simplistic.
>>>> >
>>>> >
>>>> > I was wondering if there are other projects or if others could share
>>>> > how they configure/reconfigure their loadbalancers when new tasks come
>>>> > alive.
>>>> >
>>>> >
>>>> > Just to make things a little more concrete consider the following use
>>>> > case:
>>>> >
>>>> >
>>>> > There are two web applications that are running as tasks on mesos:
>>>> > 1. webapp1 (http + https) on app1.domain.com
>>>> > 2. webapp2 (http + https) on app2.domain.com
>>>> >
>>>> >
>>>> > We want to configure a HAProxy server that routes traffic from users
>>>> > (:80 and :443) and loadbalances it correctly onto the correct set of
>>>> > tasks. Obviously there is some haproxy configuration happening here
>>>> > but i am interested in finding out what others have been doing in
>>>> > similar cases before I go around building yet another haproxy
>>>> > reconfigure and reload script.
>>>> >
>>>> >
>>>> > -- Ankur
>>>>
>>>>
>>>>
>>>
>>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ankur Chauhan <an...@malloc64.com>.
Hi Tom,
I looked at singularity some days ago and I was trying to setup Baragon and
that was the place where I couldn't figure out stuff. It seemed like it was
the right project and I could spend some time digging through the code to
figure it out but a getting started guide for baragon and deployment guide
were the things that would have helped me. The overall description gave me
a good idea (which i like) but I needed a little more of a "how do i
deploy this correctly and use it in prod" documentation.
Thanks for pointing out the mailing list. I am still learning so I'll use
that.
-- Ankur
On Thu, Sep 11, 2014 at 6:49 AM, Thomas Petr <tp...@hubspot.com> wrote:
> Hey Ankur!
>
> When was the last time you looked at Singularity? We spent some time last
> month improving our docs
> <https://github.com/HubSpot/Singularity/blob/master/README.md> in
> anticipation for MesosCon, and we're always open to feedback on what could
> be improved.
>
> We're using a combination of Singularity
> <https://github.com/HubSpot/Singularity> and Baragon
> <https://github.com/hubspot/baragon> to host web services. We use Nginx
> for load balancing (behind Amazon ELBs) but Baragon isn't tied to a
> specific type of load balancer, so it should be pretty easy to make it work
> with HAProxy. Feel free to email me, or the Singularity mailing list (
> singularity-users@googlegroups.com) if you have any questions. I'd be
> interested to see if this solution works for you!
>
> Thanks,
> Tom
>
> On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com> wrote:
>
>> I looked around a bit but the docs on aurora are almost non-existant when
>> you go into anything more that the basics. Singularity was another project
>> that caught my eye but again lack of docs make it difficult to get started.
>>
>> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <stephan@dev.static-void.de
>> > wrote:
>>
>>> Hi everybody,
>>>
>>> Ankur's post is general enough, allowing me to reiterate the question:
>>>
>>> Does anyone know about similar HAProxy solutions for Aurora?
>>>
>>> Thanks,
>>> Stephan
>>>
>>>
>>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>>> > Hi all,
>>> >
>>> >
>>> > (Please let me know if this is not the correct place for such a
>>> > question).
>>> > I have been looking at mesos + marathon + haproxy as a way of
>>> > deploying long running web applications. Mesos coupled with
>>> > marathon's /tasks api gives me all the information needed to get a
>>> > haproxy configured and load balancing all the tasks but it seems a
>>> > little too simplistic.
>>> >
>>> >
>>> > I was wondering if there are other projects or if others could share
>>> > how they configure/reconfigure their loadbalancers when new tasks come
>>> > alive.
>>> >
>>> >
>>> > Just to make things a little more concrete consider the following use
>>> > case:
>>> >
>>> >
>>> > There are two web applications that are running as tasks on mesos:
>>> > 1. webapp1 (http + https) on app1.domain.com
>>> > 2. webapp2 (http + https) on app2.domain.com
>>> >
>>> >
>>> > We want to configure a HAProxy server that routes traffic from users
>>> > (:80 and :443) and loadbalances it correctly onto the correct set of
>>> > tasks. Obviously there is some haproxy configuration happening here
>>> > but i am interested in finding out what others have been doing in
>>> > similar cases before I go around building yet another haproxy
>>> > reconfigure and reload script.
>>> >
>>> >
>>> > -- Ankur
>>>
>>>
>>>
>>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Thomas Petr <tp...@hubspot.com>.
Hey Ankur!
When was the last time you looked at Singularity? We spent some time last
month improving our docs
<https://github.com/HubSpot/Singularity/blob/master/README.md> in
anticipation for MesosCon, and we're always open to feedback on what could
be improved.
We're using a combination of Singularity
<https://github.com/HubSpot/Singularity> and Baragon
<https://github.com/hubspot/baragon> to host web services. We use Nginx for
load balancing (behind Amazon ELBs) but Baragon isn't tied to a specific
type of load balancer, so it should be pretty easy to make it work with
HAProxy. Feel free to email me, or the Singularity mailing list (
singularity-users@googlegroups.com) if you have any questions. I'd be
interested to see if this solution works for you!
Thanks,
Tom
On Thu, Sep 11, 2014 at 3:37 AM, Ankur Chauhan <an...@malloc64.com> wrote:
> I looked around a bit but the docs on aurora are almost non-existant when
> you go into anything more that the basics. Singularity was another project
> that caught my eye but again lack of docs make it difficult to get started.
>
> On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <st...@dev.static-void.de>
> wrote:
>
>> Hi everybody,
>>
>> Ankur's post is general enough, allowing me to reiterate the question:
>>
>> Does anyone know about similar HAProxy solutions for Aurora?
>>
>> Thanks,
>> Stephan
>>
>>
>> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
>> > Hi all,
>> >
>> >
>> > (Please let me know if this is not the correct place for such a
>> > question).
>> > I have been looking at mesos + marathon + haproxy as a way of
>> > deploying long running web applications. Mesos coupled with
>> > marathon's /tasks api gives me all the information needed to get a
>> > haproxy configured and load balancing all the tasks but it seems a
>> > little too simplistic.
>> >
>> >
>> > I was wondering if there are other projects or if others could share
>> > how they configure/reconfigure their loadbalancers when new tasks come
>> > alive.
>> >
>> >
>> > Just to make things a little more concrete consider the following use
>> > case:
>> >
>> >
>> > There are two web applications that are running as tasks on mesos:
>> > 1. webapp1 (http + https) on app1.domain.com
>> > 2. webapp2 (http + https) on app2.domain.com
>> >
>> >
>> > We want to configure a HAProxy server that routes traffic from users
>> > (:80 and :443) and loadbalances it correctly onto the correct set of
>> > tasks. Obviously there is some haproxy configuration happening here
>> > but i am interested in finding out what others have been doing in
>> > similar cases before I go around building yet another haproxy
>> > reconfigure and reload script.
>> >
>> >
>> > -- Ankur
>>
>>
>>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ankur Chauhan <an...@malloc64.com>.
I looked around a bit but the docs on aurora are almost non-existant when
you go into anything more that the basics. Singularity was another project
that caught my eye but again lack of docs make it difficult to get started.
On Thu, Sep 11, 2014 at 12:25 AM, Stephan Erb <st...@dev.static-void.de>
wrote:
> Hi everybody,
>
> Ankur's post is general enough, allowing me to reiterate the question:
>
> Does anyone know about similar HAProxy solutions for Aurora?
>
> Thanks,
> Stephan
>
>
> On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
> > Hi all,
> >
> >
> > (Please let me know if this is not the correct place for such a
> > question).
> > I have been looking at mesos + marathon + haproxy as a way of
> > deploying long running web applications. Mesos coupled with
> > marathon's /tasks api gives me all the information needed to get a
> > haproxy configured and load balancing all the tasks but it seems a
> > little too simplistic.
> >
> >
> > I was wondering if there are other projects or if others could share
> > how they configure/reconfigure their loadbalancers when new tasks come
> > alive.
> >
> >
> > Just to make things a little more concrete consider the following use
> > case:
> >
> >
> > There are two web applications that are running as tasks on mesos:
> > 1. webapp1 (http + https) on app1.domain.com
> > 2. webapp2 (http + https) on app2.domain.com
> >
> >
> > We want to configure a HAProxy server that routes traffic from users
> > (:80 and :443) and loadbalances it correctly onto the correct set of
> > tasks. Obviously there is some haproxy configuration happening here
> > but i am interested in finding out what others have been doing in
> > similar cases before I go around building yet another haproxy
> > reconfigure and reload script.
> >
> >
> > -- Ankur
>
>
>
Re: Frontend loadbalancer configuration for long running tasks
Posted by Stephan Erb <st...@dev.static-void.de>.
Hi everybody,
Ankur's post is general enough, allowing me to reiterate the question:
Does anyone know about similar HAProxy solutions for Aurora?
Thanks,
Stephan
On Di, 2014-09-09 at 01:52 -0700, Ankur Chauhan wrote:
> Hi all,
>
>
> (Please let me know if this is not the correct place for such a
> question).
> I have been looking at mesos + marathon + haproxy as a way of
> deploying long running web applications. Mesos coupled with
> marathon's /tasks api gives me all the information needed to get a
> haproxy configured and load balancing all the tasks but it seems a
> little too simplistic.
>
>
> I was wondering if there are other projects or if others could share
> how they configure/reconfigure their loadbalancers when new tasks come
> alive.
>
>
> Just to make things a little more concrete consider the following use
> case:
>
>
> There are two web applications that are running as tasks on mesos:
> 1. webapp1 (http + https) on app1.domain.com
> 2. webapp2 (http + https) on app2.domain.com
>
>
> We want to configure a HAProxy server that routes traffic from users
> (:80 and :443) and loadbalances it correctly onto the correct set of
> tasks. Obviously there is some haproxy configuration happening here
> but i am interested in finding out what others have been doing in
> similar cases before I go around building yet another haproxy
> reconfigure and reload script.
>
>
> -- Ankur
Re: Frontend loadbalancer configuration for long running tasks
Posted by Jing Dong <ji...@qubitproducts.com>.
Hi Ankur,
With Bamboo, depending on the scale of your applications, I suggest the
following way to manage DNS:
1. Marathon ID should be unique and namespaced with app versions, e.g
(app-prod-1, app-staging-1, app-test-1)
2. Each app-<env>-<version> mapps to a unique domain.
app-prod-<version>.example.com pointing at HAProxy(s)
3. Automate this with CI and deployment so you have a version rolling
deployment strategy
4. Top level domain app.example.com points at
app-prod-<version>.example once this ready for users.
6. Keep the old version running for a short time for fast rollback
strategy
Those previously versioned domains are deprecated/removed and never
reused again.
Human readable domain is really important for many internal Dev, PM, QA
to review multiple version or multiple groups of apps. I think Bamboo is
opinionated to scarifies very little TTL delay on staging to prod switch,
but it makes the rest of the workflow much human friendly.
We use Route53 and it's pretty good at TTL, we haven't had issue with
it.
Cheers,
Jing
On 9 September 2014 12:45, Bart Spaans <ba...@opencredo.com> wrote:
> Hi Ankur,
>
> Another solution that might fit your use case can be found at
> https://github.com/opencredo/mesos_service_discovery
>
> The main advantage of this project is that it doesn't depend on DNS, so it
> avoids issues with expiring TTLs and application caches, which can be
> problematic.
>
> Cheers,
> Bart
>
> On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
>
>> Hi all,
>>
>> (Please let me know if this is not the correct place for such a question).
>> I have been looking at mesos + marathon + haproxy as a way of deploying
>> long running web applications. Mesos coupled with marathon's /tasks api
>> gives me all the information needed to get a haproxy configured and load
>> balancing all the tasks but it seems a little too simplistic.
>>
>> I was wondering if there are other projects or if others could share how
>> they configure/reconfigure their loadbalancers when new tasks come alive.
>>
>> Just to make things a little more concrete consider the following use
>> case:
>>
>> There are two web applications that are running as tasks on mesos:
>> 1. webapp1 (http + https) on app1.domain.com
>> 2. webapp2 (http + https) on app2.domain.com
>>
>> We want to configure a HAProxy server that routes traffic from users (:80
>> and :443) and loadbalances it correctly onto the correct set of tasks.
>> Obviously there is some haproxy configuration happening here but i am
>> interested in finding out what others have been doing in similar cases
>> before I go around building yet another haproxy reconfigure and reload
>> script.
>>
>> -- Ankur
>>
>
>
>
> --
>
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies,
> destroy it immediately and it would be greatly appreciated if you notified
> the sender. It is your responsibility to protect your system from viruses
> and any other harmful code or device. We try to eliminate them from
> e-mails and attachments; but we accept no liability for any that remain. We
> may monitor or access any or all e-mails sent to us.
>
--
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it has gone to
the wrong person. Thanks.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Jing Dong <ji...@qubitproducts.com>.
You should be able to live edit Bamboo's HAProxy template, the next trigger
will use the new template. I'm working on an API to trigger reload event
programmatically.
This is extremely useful for provisioning and orchestrion of rolling update
with puppet/chef/ansible.
The template has some credentials information, I think that it's not ideal
transferring it over pure HTTP.
On 10 September 2014 09:00, Ankur Chauhan <an...@malloc64.com> wrote:
> Hi Mike,
>
> That is what i am also doing with my "daemon project", bamboo comes close
> but there are always some features that are missing so I drew inspiration
> from everyone's comments and whipped up a small project.
>
> https://github.com/ankurcha/haproxy-marathon-manager
>
> I am still developing but my idea is very simple.
> 1. User has a rest api to send application definitions (identified by the
> marathon app id - thanks bamboo for the inspiration).
> 2. The user defines the exact template of the haproxy rules (as a
> moustache.js template - thanks mike/bamboo for the inspiration). *this is
> probably the only point of difference*
> 3. Use zookeeper to save the application configurations ( thanks bamboo!).
>
> Obviously, this is pretty much as "ALPHA" as it gets but I will be vetting
> this strategy over the next few days but the theory is to make it as light
> weight as possible. As always, any comments suggestions are welcome!
>
> -- Ankur Chauhan
>
>
> On Tue, Sep 9, 2014 at 11:54 AM, Mike Michel <mi...@mmbash.de>
> wrote:
>
>> Hi,
>>
>>
>>
>> i changed the haproxy script so it makes use of haproxys ACL feature. I
>> need to have subdomains for every new app a user creates but always the
>> same root domain. The output looks like this:
>>
>>
>>
>> frontend http-in
>>
>> bind *:80
>>
>> mode http
>>
>> option httplog
>>
>> option dontlognull
>>
>> option forwardfor
>>
>> option http-server-close
>>
>> acl host_bla1 hdr_beg(host) -i bla1.dev.example.io
>>
>> use_backend bla1 if host_bla1
>>
>> acl host_easy hdr_beg(host) -i easy.dev.example.io
>>
>> use_backend easy if host_easy
>>
>> acl host_nodecellar hdr_beg(host) -i nodecellar.dev.example.io
>>
>> use_backend nodecellar if host_nodecellar
>>
>>
>>
>> backend bla1
>>
>> option httpclose
>>
>> option forwardfor
>>
>> mode http
>>
>> balance leastconn
>>
>> server bla1-1 MesosSlave01:31439 check
>>
>>
>>
>> backend easy
>>
>> option httpclose
>>
>> option forwardfor
>>
>> mode http
>>
>> balance leastconn
>>
>> server easy-2 MesosSlave02:31002 check
>>
>> server easy-1 MesosSlave02:31123 check
>>
>>
>>
>> backend nodecellar
>>
>> option httpclose
>>
>> option forwardfor
>>
>> mode http
>>
>> balance leastconn
>>
>> server nodecellar-1 MesosSlave01:31660 check
>>
>>
>>
>>
>>
>> Still fine tuning this but right now it does what i need.
>>
>>
>>
>>
>>
>> Best,
>>
>>
>>
>> Mike
>>
>>
>>
>> *Von:* Bart Spaans [mailto:bart.spaans@opencredo.com]
>> *Gesendet:* Dienstag, 9. September 2014 17:30
>> *An:* user@mesos.apache.org
>> *Betreff:* Re: Frontend loadbalancer configuration for long running tasks
>>
>>
>>
>> Hi Ankur,
>>
>>
>>
>> It doesn't cater for that at the moment, but it should be fairly easy to
>> modify the HAProxy configuration generation - have a look at haproxy.go.
>>
>>
>>
>> A setup we have been using is to have applications expose unique ports,
>> have HAProxy as an internal load balancer and then have a public facing
>> load balancer in front of that to map from port 80/443 to the internal
>> port, but YMMV.
>>
>>
>>
>> Cheers,
>>
>> Bart
>>
>>
>>
>> On 9 September 2014 17:11, Ankur Chauhan <an...@malloc64.com> wrote:
>>
>> How does mesos_service_discovery handle the case of multiple applications
>> listening to the same set of ports but differing only in the domain.
>>
>>
>> Sent from my iPhone
>>
>>
>> On Sep 9, 2014, at 4:45 AM, Bart Spaans <ba...@opencredo.com>
>> wrote:
>>
>> Hi Ankur,
>>
>>
>>
>> Another solution that might fit your use case can be found at
>> https://github.com/opencredo/mesos_service_discovery
>>
>>
>>
>> The main advantage of this project is that it doesn't depend on DNS, so
>> it avoids issues with expiring TTLs and application caches, which can be
>> problematic.
>>
>>
>>
>> Cheers,
>>
>> Bart
>>
>>
>>
>> On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
>>
>> Hi all,
>>
>>
>>
>> (Please let me know if this is not the correct place for such a question).
>>
>> I have been looking at mesos + marathon + haproxy as a way of deploying
>> long running web applications. Mesos coupled with marathon's /tasks api
>> gives me all the information needed to get a haproxy configured and load
>> balancing all the tasks but it seems a little too simplistic.
>>
>>
>>
>> I was wondering if there are other projects or if others could share how
>> they configure/reconfigure their loadbalancers when new tasks come alive.
>>
>>
>>
>> Just to make things a little more concrete consider the following use
>> case:
>>
>>
>>
>> There are two web applications that are running as tasks on mesos:
>>
>> 1. webapp1 (http + https) on app1.domain.com
>>
>> 2. webapp2 (http + https) on app2.domain.com
>>
>>
>>
>> We want to configure a HAProxy server that routes traffic from users (:80
>> and :443) and loadbalances it correctly onto the correct set of tasks.
>> Obviously there is some haproxy configuration happening here but i am
>> interested in finding out what others have been doing in similar cases
>> before I go around building yet another haproxy reconfigure and reload
>> script.
>>
>>
>>
>> -- Ankur
>>
>>
>>
>>
>>
>> --
>>
>> Bart Spaans
>> Consultant
>> OpenCredo Ltd -- Excellence in Enterprise Application Development
>>
>> Mobile: +44(0) 7453 777 558
>>
>> Registered Office: 5-11 Lavington St., London SE1 0NZ
>> Registered in UK. No 3943999
>>
>> If you have received this e-mail in error please accept our apologies,
>> destroy it immediately and it would be greatly appreciated if you notified
>> the sender. It is your responsibility to protect your system from viruses
>> and any other harmful code or device. We try to eliminate them from
>> e-mails and attachments; but we accept no liability for any that remain. We
>> may monitor or access any or all e-mails sent to us.
>>
>>
>>
>>
>>
>> --
>>
>> Bart Spaans
>> Consultant
>> OpenCredo Ltd -- Excellence in Enterprise Application Development
>>
>> Mobile: +44(0) 7453 777 558
>>
>> Registered Office: 5-11 Lavington St., London SE1 0NZ
>> Registered in UK. No 3943999
>>
>> If you have received this e-mail in error please accept our apologies,
>> destroy it immediately and it would be greatly appreciated if you notified
>> the sender. It is your responsibility to protect your system from viruses
>> and any other harmful code or device. We try to eliminate them from
>> e-mails and attachments; but we accept no liability for any that remain. We
>> may monitor or access any or all e-mails sent to us.
>>
>
>
--
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it has gone to
the wrong person. Thanks.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ankur Chauhan <an...@malloc64.com>.
Hi Mike,
That is what i am also doing with my "daemon project", bamboo comes close
but there are always some features that are missing so I drew inspiration
from everyone's comments and whipped up a small project.
https://github.com/ankurcha/haproxy-marathon-manager
I am still developing but my idea is very simple.
1. User has a rest api to send application definitions (identified by the
marathon app id - thanks bamboo for the inspiration).
2. The user defines the exact template of the haproxy rules (as a
moustache.js template - thanks mike/bamboo for the inspiration). *this is
probably the only point of difference*
3. Use zookeeper to save the application configurations ( thanks bamboo!).
Obviously, this is pretty much as "ALPHA" as it gets but I will be vetting
this strategy over the next few days but the theory is to make it as light
weight as possible. As always, any comments suggestions are welcome!
-- Ankur Chauhan
On Tue, Sep 9, 2014 at 11:54 AM, Mike Michel <mi...@mmbash.de> wrote:
> Hi,
>
>
>
> i changed the haproxy script so it makes use of haproxys ACL feature. I
> need to have subdomains for every new app a user creates but always the
> same root domain. The output looks like this:
>
>
>
> frontend http-in
>
> bind *:80
>
> mode http
>
> option httplog
>
> option dontlognull
>
> option forwardfor
>
> option http-server-close
>
> acl host_bla1 hdr_beg(host) -i bla1.dev.example.io
>
> use_backend bla1 if host_bla1
>
> acl host_easy hdr_beg(host) -i easy.dev.example.io
>
> use_backend easy if host_easy
>
> acl host_nodecellar hdr_beg(host) -i nodecellar.dev.example.io
>
> use_backend nodecellar if host_nodecellar
>
>
>
> backend bla1
>
> option httpclose
>
> option forwardfor
>
> mode http
>
> balance leastconn
>
> server bla1-1 MesosSlave01:31439 check
>
>
>
> backend easy
>
> option httpclose
>
> option forwardfor
>
> mode http
>
> balance leastconn
>
> server easy-2 MesosSlave02:31002 check
>
> server easy-1 MesosSlave02:31123 check
>
>
>
> backend nodecellar
>
> option httpclose
>
> option forwardfor
>
> mode http
>
> balance leastconn
>
> server nodecellar-1 MesosSlave01:31660 check
>
>
>
>
>
> Still fine tuning this but right now it does what i need.
>
>
>
>
>
> Best,
>
>
>
> Mike
>
>
>
> *Von:* Bart Spaans [mailto:bart.spaans@opencredo.com]
> *Gesendet:* Dienstag, 9. September 2014 17:30
> *An:* user@mesos.apache.org
> *Betreff:* Re: Frontend loadbalancer configuration for long running tasks
>
>
>
> Hi Ankur,
>
>
>
> It doesn't cater for that at the moment, but it should be fairly easy to
> modify the HAProxy configuration generation - have a look at haproxy.go.
>
>
>
> A setup we have been using is to have applications expose unique ports,
> have HAProxy as an internal load balancer and then have a public facing
> load balancer in front of that to map from port 80/443 to the internal
> port, but YMMV.
>
>
>
> Cheers,
>
> Bart
>
>
>
> On 9 September 2014 17:11, Ankur Chauhan <an...@malloc64.com> wrote:
>
> How does mesos_service_discovery handle the case of multiple applications
> listening to the same set of ports but differing only in the domain.
>
>
> Sent from my iPhone
>
>
> On Sep 9, 2014, at 4:45 AM, Bart Spaans <ba...@opencredo.com> wrote:
>
> Hi Ankur,
>
>
>
> Another solution that might fit your use case can be found at
> https://github.com/opencredo/mesos_service_discovery
>
>
>
> The main advantage of this project is that it doesn't depend on DNS, so it
> avoids issues with expiring TTLs and application caches, which can be
> problematic.
>
>
>
> Cheers,
>
> Bart
>
>
>
> On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
>
> Hi all,
>
>
>
> (Please let me know if this is not the correct place for such a question).
>
> I have been looking at mesos + marathon + haproxy as a way of deploying
> long running web applications. Mesos coupled with marathon's /tasks api
> gives me all the information needed to get a haproxy configured and load
> balancing all the tasks but it seems a little too simplistic.
>
>
>
> I was wondering if there are other projects or if others could share how
> they configure/reconfigure their loadbalancers when new tasks come alive.
>
>
>
> Just to make things a little more concrete consider the following use case:
>
>
>
> There are two web applications that are running as tasks on mesos:
>
> 1. webapp1 (http + https) on app1.domain.com
>
> 2. webapp2 (http + https) on app2.domain.com
>
>
>
> We want to configure a HAProxy server that routes traffic from users (:80
> and :443) and loadbalances it correctly onto the correct set of tasks.
> Obviously there is some haproxy configuration happening here but i am
> interested in finding out what others have been doing in similar cases
> before I go around building yet another haproxy reconfigure and reload
> script.
>
>
>
> -- Ankur
>
>
>
>
>
> --
>
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies,
> destroy it immediately and it would be greatly appreciated if you notified
> the sender. It is your responsibility to protect your system from viruses
> and any other harmful code or device. We try to eliminate them from
> e-mails and attachments; but we accept no liability for any that remain. We
> may monitor or access any or all e-mails sent to us.
>
>
>
>
>
> --
>
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies,
> destroy it immediately and it would be greatly appreciated if you notified
> the sender. It is your responsibility to protect your system from viruses
> and any other harmful code or device. We try to eliminate them from
> e-mails and attachments; but we accept no liability for any that remain. We
> may monitor or access any or all e-mails sent to us.
>
AW: Frontend loadbalancer configuration for long running tasks
Posted by Mike Michel <mi...@mmbash.de>.
Hi,
i changed the haproxy script so it makes use of haproxys ACL feature. I need to have subdomains for every new app a user creates but always the same root domain. The output looks like this:
frontend http-in
bind *:80
mode http
option httplog
option dontlognull
option forwardfor
option http-server-close
acl host_bla1 hdr_beg(host) -i bla1.dev.example.io
use_backend bla1 if host_bla1
acl host_easy hdr_beg(host) -i easy.dev.example.io
use_backend easy if host_easy
acl host_nodecellar hdr_beg(host) -i nodecellar.dev.example.io
use_backend nodecellar if host_nodecellar
backend bla1
option httpclose
option forwardfor
mode http
balance leastconn
server bla1-1 MesosSlave01:31439 check
backend easy
option httpclose
option forwardfor
mode http
balance leastconn
server easy-2 MesosSlave02:31002 check
server easy-1 MesosSlave02:31123 check
backend nodecellar
option httpclose
option forwardfor
mode http
balance leastconn
server nodecellar-1 MesosSlave01:31660 check
Still fine tuning this but right now it does what i need.
Best,
Mike
Von: Bart Spaans [mailto:bart.spaans@opencredo.com]
Gesendet: Dienstag, 9. September 2014 17:30
An: user@mesos.apache.org
Betreff: Re: Frontend loadbalancer configuration for long running tasks
Hi Ankur,
It doesn't cater for that at the moment, but it should be fairly easy to modify the HAProxy configuration generation - have a look at haproxy.go.
A setup we have been using is to have applications expose unique ports, have HAProxy as an internal load balancer and then have a public facing load balancer in front of that to map from port 80/443 to the internal port, but YMMV.
Cheers,
Bart
On 9 September 2014 17:11, Ankur Chauhan <an...@malloc64.com> wrote:
How does mesos_service_discovery handle the case of multiple applications listening to the same set of ports but differing only in the domain.
Sent from my iPhone
On Sep 9, 2014, at 4:45 AM, Bart Spaans <ba...@opencredo.com> wrote:
Hi Ankur,
Another solution that might fit your use case can be found at https://github.com/opencredo/mesos_service_discovery
The main advantage of this project is that it doesn't depend on DNS, so it avoids issues with expiring TTLs and application caches, which can be problematic.
Cheers,
Bart
On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
Hi all,
(Please let me know if this is not the correct place for such a question).
I have been looking at mesos + marathon + haproxy as a way of deploying long running web applications. Mesos coupled with marathon's /tasks api gives me all the information needed to get a haproxy configured and load balancing all the tasks but it seems a little too simplistic.
I was wondering if there are other projects or if others could share how they configure/reconfigure their loadbalancers when new tasks come alive.
Just to make things a little more concrete consider the following use case:
There are two web applications that are running as tasks on mesos:
1. webapp1 (http + https) on app1.domain.com
2. webapp2 (http + https) on app2.domain.com
We want to configure a HAProxy server that routes traffic from users (:80 and :443) and loadbalances it correctly onto the correct set of tasks. Obviously there is some haproxy configuration happening here but i am interested in finding out what others have been doing in similar cases before I go around building yet another haproxy reconfigure and reload script.
-- Ankur
--
Bart Spaans
Consultant
OpenCredo Ltd -- Excellence in Enterprise Application Development
Mobile: +44(0) 7453 777 558
Registered Office: 5-11 Lavington St., London SE1 0NZ
Registered in UK. No 3943999
If you have received this e-mail in error please accept our apologies, destroy it immediately and it would be greatly appreciated if you notified the sender. It is your responsibility to protect your system from viruses and any other harmful code or device. We try to eliminate them from e-mails and attachments; but we accept no liability for any that remain. We may monitor or access any or all e-mails sent to us.
--
Bart Spaans
Consultant
OpenCredo Ltd -- Excellence in Enterprise Application Development
Mobile: +44(0) 7453 777 558
Registered Office: 5-11 Lavington St., London SE1 0NZ
Registered in UK. No 3943999
If you have received this e-mail in error please accept our apologies, destroy it immediately and it would be greatly appreciated if you notified the sender. It is your responsibility to protect your system from viruses and any other harmful code or device. We try to eliminate them from e-mails and attachments; but we accept no liability for any that remain. We may monitor or access any or all e-mails sent to us.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Bart Spaans <ba...@opencredo.com>.
Hi Ankur,
It doesn't cater for that at the moment, but it should be fairly easy to
modify the HAProxy configuration generation - have a look at haproxy.go.
A setup we have been using is to have applications expose unique ports,
have HAProxy as an internal load balancer and then have a public facing
load balancer in front of that to map from port 80/443 to the internal
port, but YMMV.
Cheers,
Bart
On 9 September 2014 17:11, Ankur Chauhan <an...@malloc64.com> wrote:
> How does mesos_service_discovery handle the case of multiple applications
> listening to the same set of ports but differing only in the domain.
>
> Sent from my iPhone
>
> On Sep 9, 2014, at 4:45 AM, Bart Spaans <ba...@opencredo.com> wrote:
>
> Hi Ankur,
>
> Another solution that might fit your use case can be found at
> https://github.com/opencredo/mesos_service_discovery
>
> The main advantage of this project is that it doesn't depend on DNS, so it
> avoids issues with expiring TTLs and application caches, which can be
> problematic.
>
> Cheers,
> Bart
>
> On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
>
>> Hi all,
>>
>> (Please let me know if this is not the correct place for such a question).
>> I have been looking at mesos + marathon + haproxy as a way of deploying
>> long running web applications. Mesos coupled with marathon's /tasks api
>> gives me all the information needed to get a haproxy configured and load
>> balancing all the tasks but it seems a little too simplistic.
>>
>> I was wondering if there are other projects or if others could share how
>> they configure/reconfigure their loadbalancers when new tasks come alive.
>>
>> Just to make things a little more concrete consider the following use
>> case:
>>
>> There are two web applications that are running as tasks on mesos:
>> 1. webapp1 (http + https) on app1.domain.com
>> 2. webapp2 (http + https) on app2.domain.com
>>
>> We want to configure a HAProxy server that routes traffic from users (:80
>> and :443) and loadbalances it correctly onto the correct set of tasks.
>> Obviously there is some haproxy configuration happening here but i am
>> interested in finding out what others have been doing in similar cases
>> before I go around building yet another haproxy reconfigure and reload
>> script.
>>
>> -- Ankur
>>
>
>
>
> --
>
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies,
> destroy it immediately and it would be greatly appreciated if you notified
> the sender. It is your responsibility to protect your system from viruses
> and any other harmful code or device. We try to eliminate them from
> e-mails and attachments; but we accept no liability for any that remain. We
> may monitor or access any or all e-mails sent to us.
>
>
--
Bart Spaans
Consultant
OpenCredo Ltd -- Excellence in Enterprise Application Development
Mobile: +44(0) 7453 777 558
Registered Office: 5-11 Lavington St., London SE1 0NZ
Registered in UK. No 3943999
If you have received this e-mail in error please accept our apologies,
destroy it immediately and it would be greatly appreciated if you notified
the sender. It is your responsibility to protect your system from viruses
and any other harmful code or device. We try to eliminate them from
e-mails and attachments; but we accept no liability for any that remain. We
may monitor or access any or all e-mails sent to us.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Ankur Chauhan <an...@malloc64.com>.
How does mesos_service_discovery handle the case of multiple applications listening to the same set of ports but differing only in the domain.
Sent from my iPhone
> On Sep 9, 2014, at 4:45 AM, Bart Spaans <ba...@opencredo.com> wrote:
>
> Hi Ankur,
>
> Another solution that might fit your use case can be found at https://github.com/opencredo/mesos_service_discovery
>
> The main advantage of this project is that it doesn't depend on DNS, so it avoids issues with expiring TTLs and application caches, which can be problematic.
>
> Cheers,
> Bart
>
>> On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
>> Hi all,
>>
>> (Please let me know if this is not the correct place for such a question).
>> I have been looking at mesos + marathon + haproxy as a way of deploying long running web applications. Mesos coupled with marathon's /tasks api gives me all the information needed to get a haproxy configured and load balancing all the tasks but it seems a little too simplistic.
>>
>> I was wondering if there are other projects or if others could share how they configure/reconfigure their loadbalancers when new tasks come alive.
>>
>> Just to make things a little more concrete consider the following use case:
>>
>> There are two web applications that are running as tasks on mesos:
>> 1. webapp1 (http + https) on app1.domain.com
>> 2. webapp2 (http + https) on app2.domain.com
>>
>> We want to configure a HAProxy server that routes traffic from users (:80 and :443) and loadbalances it correctly onto the correct set of tasks. Obviously there is some haproxy configuration happening here but i am interested in finding out what others have been doing in similar cases before I go around building yet another haproxy reconfigure and reload script.
>>
>> -- Ankur
>
>
>
> --
> Bart Spaans
> Consultant
> OpenCredo Ltd -- Excellence in Enterprise Application Development
>
> Mobile: +44(0) 7453 777 558
>
> Registered Office: 5-11 Lavington St., London SE1 0NZ
> Registered in UK. No 3943999
>
> If you have received this e-mail in error please accept our apologies, destroy it immediately and it would be greatly appreciated if you notified the sender. It is your responsibility to protect your system from viruses and any other harmful code or device. We try to eliminate them from e-mails and attachments; but we accept no liability for any that remain. We may monitor or access any or all e-mails sent to us.
Re: Frontend loadbalancer configuration for long running tasks
Posted by Bart Spaans <ba...@opencredo.com>.
Hi Ankur,
Another solution that might fit your use case can be found at
https://github.com/opencredo/mesos_service_discovery
The main advantage of this project is that it doesn't depend on DNS, so it
avoids issues with expiring TTLs and application caches, which can be
problematic.
Cheers,
Bart
On 9 September 2014 10:52, Ankur Chauhan <an...@malloc64.com> wrote:
> Hi all,
>
> (Please let me know if this is not the correct place for such a question).
> I have been looking at mesos + marathon + haproxy as a way of deploying
> long running web applications. Mesos coupled with marathon's /tasks api
> gives me all the information needed to get a haproxy configured and load
> balancing all the tasks but it seems a little too simplistic.
>
> I was wondering if there are other projects or if others could share how
> they configure/reconfigure their loadbalancers when new tasks come alive.
>
> Just to make things a little more concrete consider the following use case:
>
> There are two web applications that are running as tasks on mesos:
> 1. webapp1 (http + https) on app1.domain.com
> 2. webapp2 (http + https) on app2.domain.com
>
> We want to configure a HAProxy server that routes traffic from users (:80
> and :443) and loadbalances it correctly onto the correct set of tasks.
> Obviously there is some haproxy configuration happening here but i am
> interested in finding out what others have been doing in similar cases
> before I go around building yet another haproxy reconfigure and reload
> script.
>
> -- Ankur
>
--
Bart Spaans
Consultant
OpenCredo Ltd -- Excellence in Enterprise Application Development
Mobile: +44(0) 7453 777 558
Registered Office: 5-11 Lavington St., London SE1 0NZ
Registered in UK. No 3943999
If you have received this e-mail in error please accept our apologies,
destroy it immediately and it would be greatly appreciated if you notified
the sender. It is your responsibility to protect your system from viruses
and any other harmful code or device. We try to eliminate them from
e-mails and attachments; but we accept no liability for any that remain. We
may monitor or access any or all e-mails sent to us.