Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Thomas Diesler-2
Hi Stuart/Friends,


In fabric a camel load balancer can contact a (zookeeper) registry using a logical name to react to changes in server topology or for initial discovery. I wonder how this can/should be done in the context of undertow http endpoints on wildfly.

cheers
— thomas

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Stuart Douglas-2
I'm not really sure exactly what you mean here, do you want the Undertow load balancer to be able to use the data from the zookeper registry? Or are you talking about having the Undertow endpoints register themselves with zookeeper?

Stuart

----- Original Message -----

> From: "Thomas Diesler" <[hidden email]>
> To: "Stuart Douglas" <[hidden email]>
> Cc: [hidden email]
> Sent: Thursday, 26 November, 2015 1:03:16 AM
> Subject: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints
>
> Hi Stuart/Friends,
>
> https://github.com/wildfly-extras/wildfly-camel/issues/878
> <https://github.com/wildfly-extras/wildfly-camel/issues/878>
>
> In fabric a camel load balancer can contact a (zookeeper) registry using a
> logical name to react to changes in server topology or for initial
> discovery. I wonder how this can/should be done in the context of undertow
> http endpoints on wildfly.
>
> cheers
> — thomas

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Thomas Diesler-2
Zookeeper is part of the Fabric architecture. I may be an option in the context of this conversation, but its not something that we have already readily available.

In the most simplistic scenario, we have a remote Camel Http client that wants to connect to cluster of wildfly servers that expose undertow endpoints. The Camel client wants to use a load balancer like this

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="direct:start"/>
    <loadBalance>        
        <roundRobin/>
        <to uri="mock:x"/>        
        <to uri="mock:y"/>       
        <to uri="mock:z"/>                 
    </loadBalance>
  </route>
</camelContext> 

I now wonder if it is possible to implement a camel load balancer variant that is able to discover the initial topology of wildfly http endpoints and later react on changes in that topology. Does that make sense?

cheers
— thomas

On 27 Nov 2015, at 00:09, Stuart Douglas <[hidden email]> wrote:

I'm not really sure exactly what you mean here, do you want the Undertow load balancer to be able to use the data from the zookeper registry? Or are you talking about having the Undertow endpoints register themselves with zookeeper?

Stuart

----- Original Message -----
From: "Thomas Diesler" <[hidden email]>
To: "Stuart Douglas" <[hidden email]>
Cc: [hidden email]
Sent: Thursday, 26 November, 2015 1:03:16 AM
Subject: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Hi Stuart/Friends,

https://github.com/wildfly-extras/wildfly-camel/issues/878
<https://github.com/wildfly-extras/wildfly-camel/issues/878>

In fabric a camel load balancer can contact a (zookeeper) registry using a
logical name to react to changes in server topology or for initial
discovery. I wonder how this can/should be done in the context of undertow
http endpoints on wildfly.

cheers
— thomas

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Stuart Douglas-2
So the load balancing happens on the client side?

Stuart

----- Original Message -----

> From: "Thomas Diesler" <[hidden email]>
> To: "Stuart Douglas" <[hidden email]>
> Cc: [hidden email]
> Sent: Friday, 27 November, 2015 6:43:22 PM
> Subject: Re: [wildfly-dev] Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints
>
> Zookeeper is part of the Fabric architecture. I may be an option in the
> context of this conversation, but its not something that we have already
> readily available.
>
> In the most simplistic scenario, we have a remote Camel Http client that
> wants to connect to cluster of wildfly servers that expose undertow
> endpoints. The Camel client wants to use a load balancer
> <http://camel.apache.org/load-balancer.html> like this
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>   <route>
>     <from uri="direct:start"/>
>     <loadBalance>
>         <roundRobin/>
>         <to uri="mock:x"/>
>         <to uri="mock:y"/>
>         <to uri="mock:z"/>
>     </loadBalance>
>   </route>
> </camelContext>
>
> I now wonder if it is possible to implement a camel load balancer variant
> that is able to discover the initial topology of wildfly http endpoints and
> later react on changes in that topology. Does that make sense?
>
> cheers
> — thomas
>
> > On 27 Nov 2015, at 00:09, Stuart Douglas <[hidden email]> wrote:
> >
> > I'm not really sure exactly what you mean here, do you want the Undertow
> > load balancer to be able to use the data from the zookeper registry? Or
> > are you talking about having the Undertow endpoints register themselves
> > with zookeeper?
> >
> > Stuart
> >
> > ----- Original Message -----
> >> From: "Thomas Diesler" <[hidden email]>
> >> To: "Stuart Douglas" <[hidden email]>
> >> Cc: [hidden email]
> >> Sent: Thursday, 26 November, 2015 1:03:16 AM
> >> Subject: Allow Camel LoadBalancer to connect to clustered WildFly HTTP
> >> endpoints
> >>
> >> Hi Stuart/Friends,
> >>
> >> https://github.com/wildfly-extras/wildfly-camel/issues/878
> >> <https://github.com/wildfly-extras/wildfly-camel/issues/878>
> >>
> >> In fabric a camel load balancer can contact a (zookeeper) registry using a
> >> logical name to react to changes in server topology or for initial
> >> discovery. I wonder how this can/should be done in the context of undertow
> >> http endpoints on wildfly.
> >>
> >> cheers
> >> — thomas
> >
> > _______________________________________________
> > wildfly-dev mailing list
> > [hidden email]
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Thomas Diesler-2
yes

> On 27 Nov 2015, at 09:21, Stuart Douglas <[hidden email]> wrote:
>
> So the load balancing happens on the client side?
>
> Stuart
>
> ----- Original Message -----
>> From: "Thomas Diesler" <[hidden email]>
>> To: "Stuart Douglas" <[hidden email]>
>> Cc: [hidden email]
>> Sent: Friday, 27 November, 2015 6:43:22 PM
>> Subject: Re: [wildfly-dev] Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints
>>
>> Zookeeper is part of the Fabric architecture. I may be an option in the
>> context of this conversation, but its not something that we have already
>> readily available.
>>
>> In the most simplistic scenario, we have a remote Camel Http client that
>> wants to connect to cluster of wildfly servers that expose undertow
>> endpoints. The Camel client wants to use a load balancer
>> <http://camel.apache.org/load-balancer.html> like this
>>
>> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>>  <route>
>>    <from uri="direct:start"/>
>>    <loadBalance>
>>        <roundRobin/>
>>        <to uri="mock:x"/>
>>        <to uri="mock:y"/>
>>        <to uri="mock:z"/>
>>    </loadBalance>
>>  </route>
>> </camelContext>
>>
>> I now wonder if it is possible to implement a camel load balancer variant
>> that is able to discover the initial topology of wildfly http endpoints and
>> later react on changes in that topology. Does that make sense?
>>
>> cheers
>> — thomas
>>
>>> On 27 Nov 2015, at 00:09, Stuart Douglas <[hidden email]> wrote:
>>>
>>> I'm not really sure exactly what you mean here, do you want the Undertow
>>> load balancer to be able to use the data from the zookeper registry? Or
>>> are you talking about having the Undertow endpoints register themselves
>>> with zookeeper?
>>>
>>> Stuart
>>>
>>> ----- Original Message -----
>>>> From: "Thomas Diesler" <[hidden email]>
>>>> To: "Stuart Douglas" <[hidden email]>
>>>> Cc: [hidden email]
>>>> Sent: Thursday, 26 November, 2015 1:03:16 AM
>>>> Subject: Allow Camel LoadBalancer to connect to clustered WildFly HTTP
>>>> endpoints
>>>>
>>>> Hi Stuart/Friends,
>>>>
>>>> https://github.com/wildfly-extras/wildfly-camel/issues/878
>>>> <https://github.com/wildfly-extras/wildfly-camel/issues/878>
>>>>
>>>> In fabric a camel load balancer can contact a (zookeeper) registry using a
>>>> logical name to react to changes in server topology or for initial
>>>> discovery. I wonder how this can/should be done in the context of undertow
>>>> http endpoints on wildfly.
>>>>
>>>> cheers
>>>> — thomas
>>>
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>
>>


_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Tomaž Cerar-2
In reply to this post by Thomas Diesler-2

On Fri, Nov 27, 2015 at 8:43 AM, Thomas Diesler <[hidden email]> wrote:

I now wonder if it is possible to implement a camel load balancer variant that is able to discover the initial topology of wildfly http endpoints and later react on changes in that topology. Does that make sense?


I am thinking that you could register undertow subsystem event listeners in camel subsystem (or any other that is for that purpase)
So undertow subsystem would send you events on when deployments are started/stopped, hosts are started/stopped.
This is how we integrate with mod_cluster subsystem that than broadcasts the config to the apache mod_cluster module.

You could get this events and than push config to zookeeper based on that.

would that work for you?

--
tomaz




_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: Allow Camel LoadBalancer to connect to clustered WildFly HTTP endpoints

Thomas Diesler-2
Yes, thank you - that’s an option.

— thomas

On 27 Nov 2015, at 12:27, Tomaž Cerar <[hidden email]> wrote:


On Fri, Nov 27, 2015 at 8:43 AM, Thomas Diesler <[hidden email]> wrote:

I now wonder if it is possible to implement a camel load balancer variant that is able to discover the initial topology of wildfly http endpoints and later react on changes in that topology. Does that make sense?


I am thinking that you could register undertow subsystem event listeners in camel subsystem (or any other that is for that purpase)
So undertow subsystem would send you events on when deployments are started/stopped, hosts are started/stopped.
This is how we integrate with mod_cluster subsystem that than broadcasts the config to the apache mod_cluster module.

You could get this events and than push config to zookeeper based on that.

would that work for you?

--
tomaz





_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev