stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Swapnil Patil <swapnil.r...@gmail.com>
Subject Re: Google Compute Engine Load Balancing Support for Stratos - GSoC 2015
Date Tue, 21 Apr 2015 06:01:29 GMT
Hi Imesh,

Thank you for your input.

Yes, I agree that we should create a target pool for each cluster. But as
far as I know, we can't assign IP address to a target pool. We can assign
IP address to a forwarding rule and a target pool will be associated with a
forwarding rule. Also forwarding rule can filter requests based on the port
number.

Yes, we could map external IP of forwarding rule to a hostname by using DNS
entry or by using /etc/hosts.

But I have one doubt, each service has a port and proxy port. Now I assume
that 'proxy port' is used while contacting a load balancer and load
balancer will send the request on port value 'port' of an instance. Please
correct me if I am wrong here.

If this port-proxy port scenario I have assumed is correct, then I am not
sure which component will do this switching of port value of requests if we
don't use HA Proxy.

Could you please let me know if I have misinterpreted anything or this port
switching can be done even if we don't use HA Proxy?

Thanks and Regards,
Swapnil Patil
IIIT Hyderabad

On Mon, Apr 20, 2015 at 11:05 PM, Imesh Gunaratne <imesh@apache.org> wrote:

> Hi Swapnil,
>
> Thanks for your response on this. IMO we could achieve this functionality
> without having to use a haproxy instance.
>
> The concept we have here is to group all the members of a cluster and use
> a hostname to load balance incoming requests among them. With GCE what we
> can do is to create a target pool for each cluster and either have a
> dedicated external IP address for each target pool or use different ports
> on the same external IP address to access them.
>
> As an additional step we could map the external IP address to a hostname
> by using a DNS entry or by using /etc/hosts.
>
> Thanks
>
> On Mon, Apr 20, 2015 at 9:57 PM, Swapnil Patil <swapnil.rp15@gmail.com>
> wrote:
>
>> Hi,
>>
>> I have proposed a solution for the project on $subject where I am using
>> an HA Proxy between incoming request and Google Compute Engine (GCE) load
>> balancing components.
>>
>> I have been advised to provide more description regarding why I am using
>> HA Proxy in my proposed solution.
>>
>> Please find below the reason for the same.
>>
>> Stratos needs to route traffic based on the hostname field of the
>> incoming request. I have proposed to use Network Load Balancing of Google
>> Compute Engine (GCE) which does not provide any central component that
>> makes routing decisions based on the hostname field of the request.
>>
>> GCE network load balancing has following concepts
>> 1. Target pool - a set of instances. In Stratos, a cluster can be treated
>> as target pool.
>> 2. Forwarding rule - A forwarding rule has an external IP, a port range,
>> a target pool. Whenever a request is made to this external IP with port
>> numbers specified in the port range, the request is routed to the specified
>> target pool.
>>
>> As GCE network load balancing does not have any mechanism to route
>> traffic based on hostname, I proposed to use HA Proxy between incoming
>> requests and GCE load balancing components.
>>
>> If we use HA Proxy, we can add a rule saying which forwarding rule should
>> be used for a particular combination of hostname, protocol and port. So
>> forwarding rules of GCE load balancing will act as backend instances of HA
>> Proxy.
>>
>> So overall flow would be as follows
>> 1. HA Proxy decides which backend (forwarding rule) to use based on the
>> incoming request.
>> 2. Request is delegated to the GCE forwarding rule associated with that
>> backend.
>> 3. Forwarding rule of GCE routes the incoming request to the target pool
>> which is specified in the rule.
>> 4. Target pool routes the incoming request to a particular instance in
>> the pool i.e. an instance in the cluster.
>>
>> This is what I thought would be an appropriate solution. I would
>> appreciate if anybody has any thoughts on this.
>>
>> Thanks and Regards,
>> Swapnil Patil
>> IIIT Hyderabad
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Mime
View raw message