You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Sajith Kariyawasam <sa...@wso2.com> on 2015/05/04 06:08:24 UTC

[Proposal] LVS load balancer support for Apache Stratos

Hi Devs,

I would like to propose LVS load balancer support for Stratos.

In a normal working setup as mentioned in [1], two load balancers (each
running ipvsadm and keepalived) are paired, one master and one slave.
Keepalived is configured per pair using vrrp allows the automatic failover
to let the slave become master if load balancing dies on the master.
There are N real servers each running the real service located behind the
load balancer. With Stratos in place, the real servers are orchestrated and
monitored by Stratos and whenever an extra real server gets added to the
cluster of real servers (because of scaling up) the load balancers need to
get updated by Stratos to include the new real server in the load balancing
decisions. In the same way, if a real server becomes unavailable (scaled
down), the load balancers need to get updated by Stratos to remove the now
unavailable server from the load balancing decisions.

This requires load balancer configuration to be updated accordingly to
reflect new real server (member) IP s, and this can be implemented by
extending Stratos load balancer extension API. This "plugin" will be
listenning to the "Topology" topic of Message broker and will update the
LVS load balancer configuration (both master and slave if present)
accordingly, either when extra real servers added up in a scale-up or when
extra real servers removed in scale-down.

In each of real server, the required configuration (bringing up dummy
interface) can be done via puppet or via a cartridge agent module. For that
the virtual ip address needs to be passed in the payload when the real
server is booting up.

[1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/


Thanks,
Sajith

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Imesh Gunaratne <im...@apache.org>.
+1 for the proposal Sajith! It's nice to see more load balancer extensions
being added.

On Tue, May 5, 2015 at 11:20 AM, Lakmal Warusawithana <la...@wso2.com>
wrote:

> +1 Sajith, since we have feature freeze for 4.1.0 please work in separate
> branch (or local) and merge it into master soon after 4.1.0 release.
>
> On Mon, May 4, 2015 at 9:38 AM, Sajith Kariyawasam <sa...@wso2.com>
> wrote:
>
>> Hi Devs,
>>
>> I would like to propose LVS load balancer support for Stratos.
>>
>> In a normal working setup as mentioned in [1], two load balancers (each
>> running ipvsadm and keepalived) are paired, one master and one slave.
>> Keepalived is configured per pair using vrrp allows the automatic failover
>> to let the slave become master if load balancing dies on the master.
>> There are N real servers each running the real service located behind the
>> load balancer. With Stratos in place, the real servers are orchestrated and
>> monitored by Stratos and whenever an extra real server gets added to the
>> cluster of real servers (because of scaling up) the load balancers need to
>> get updated by Stratos to include the new real server in the load balancing
>> decisions. In the same way, if a real server becomes unavailable (scaled
>> down), the load balancers need to get updated by Stratos to remove the now
>> unavailable server from the load balancing decisions.
>>
>> This requires load balancer configuration to be updated accordingly to
>> reflect new real server (member) IP s, and this can be implemented by
>> extending Stratos load balancer extension API. This "plugin" will be
>> listenning to the "Topology" topic of Message broker and will update the
>> LVS load balancer configuration (both master and slave if present)
>> accordingly, either when extra real servers added up in a scale-up or when
>> extra real servers removed in scale-down.
>>
>> In each of real server, the required configuration (bringing up dummy
>> interface) can be done via puppet or via a cartridge agent module. For that
>> the virtual ip address needs to be passed in the payload when the real
>> server is booting up.
>>
>> [1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>>
>>
>> Thanks,
>> Sajith
>>
>
>
>
> --
> Lakmal Warusawithana
> Vice President, Apache Stratos
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog : http://lakmalsview.blogspot.com/
>
>


-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Lakmal Warusawithana <la...@wso2.com>.
+1 Sajith, since we have feature freeze for 4.1.0 please work in separate
branch (or local) and merge it into master soon after 4.1.0 release.

On Mon, May 4, 2015 at 9:38 AM, Sajith Kariyawasam <sa...@wso2.com> wrote:

> Hi Devs,
>
> I would like to propose LVS load balancer support for Stratos.
>
> In a normal working setup as mentioned in [1], two load balancers (each
> running ipvsadm and keepalived) are paired, one master and one slave.
> Keepalived is configured per pair using vrrp allows the automatic failover
> to let the slave become master if load balancing dies on the master.
> There are N real servers each running the real service located behind the
> load balancer. With Stratos in place, the real servers are orchestrated and
> monitored by Stratos and whenever an extra real server gets added to the
> cluster of real servers (because of scaling up) the load balancers need to
> get updated by Stratos to include the new real server in the load balancing
> decisions. In the same way, if a real server becomes unavailable (scaled
> down), the load balancers need to get updated by Stratos to remove the now
> unavailable server from the load balancing decisions.
>
> This requires load balancer configuration to be updated accordingly to
> reflect new real server (member) IP s, and this can be implemented by
> extending Stratos load balancer extension API. This "plugin" will be
> listenning to the "Topology" topic of Message broker and will update the
> LVS load balancer configuration (both master and slave if present)
> accordingly, either when extra real servers added up in a scale-up or when
> extra real servers removed in scale-down.
>
> In each of real server, the required configuration (bringing up dummy
> interface) can be done via puppet or via a cartridge agent module. For that
> the virtual ip address needs to be passed in the payload when the real
> server is booting up.
>
> [1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>
>
> Thanks,
> Sajith
>



-- 
Lakmal Warusawithana
Vice President, Apache Stratos
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Gayan Gunarathne <ga...@wso2.com>.
Created a new branch for developments of LVS extension for Stratos.

branch name : lvs_extension

Thanks,
Gayan

On Thu, May 14, 2015 at 4:17 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> +1 .It is good to have LVS support for Stratos, so world like to
> contribute to this.
>
> Will create a new branch from master branch and work on that branch since
> features are freeze for 4.1.0 release.After 4.1.0 release we can merge
> those changes to the master branch.
>
> Thanks,
> Gayan
>
>
> On Thu, May 7, 2015 at 9:45 PM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi Sajith,
>>
>> Yes, I missed the scenario where the load balancer runs standalone. An
>> extension would be the best approach then.
>> On May 4, 2015 2:41 PM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>>
>>> Hi Chamila,
>>>
>>> Thanks for the suggestion. But If we use a cartridge agent plugin, then
>>> load balancers must be run as cartridges. IMO If we implement as a load
>>> balancer extension, then that could be used when the LB is running as a
>>> cartridge as well as stand alone mode, interchangeably. ?
>>>
>>> Thanks,
>>> Sajith
>>>
>>> On Mon, May 4, 2015 at 11:02 AM, Chamila De Alwis <ch...@wso2.com>
>>> wrote:
>>>
>>>> Hi Sajith,
>>>>
>>>> +1 for providing this support. AFAIU can't we use a Cartridge Agent
>>>> plugin to reconfigure the load balancers as well?
>>>> On May 4, 2015 9:38 AM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>>>>
>>>>> Hi Devs,
>>>>>
>>>>> I would like to propose LVS load balancer support for Stratos.
>>>>>
>>>>> In a normal working setup as mentioned in [1], two load balancers
>>>>> (each running ipvsadm and keepalived) are paired, one master and one slave.
>>>>> Keepalived is configured per pair using vrrp allows the automatic failover
>>>>> to let the slave become master if load balancing dies on the master.
>>>>> There are N real servers each running the real service located behind
>>>>> the load balancer. With Stratos in place, the real servers are orchestrated
>>>>> and monitored by Stratos and whenever an extra real server gets added to
>>>>> the cluster of real servers (because of scaling up) the load balancers need
>>>>> to get updated by Stratos to include the new real server in the load
>>>>> balancing decisions. In the same way, if a real server becomes unavailable
>>>>> (scaled down), the load balancers need to get updated by Stratos to remove
>>>>> the now unavailable server from the load balancing decisions.
>>>>>
>>>>> This requires load balancer configuration to be updated accordingly to
>>>>> reflect new real server (member) IP s, and this can be implemented by
>>>>> extending Stratos load balancer extension API. This "plugin" will be
>>>>> listenning to the "Topology" topic of Message broker and will update the
>>>>> LVS load balancer configuration (both master and slave if present)
>>>>> accordingly, either when extra real servers added up in a scale-up or when
>>>>> extra real servers removed in scale-down.
>>>>>
>>>>> In each of real server, the required configuration (bringing up dummy
>>>>> interface) can be done via puppet or via a cartridge agent module. For that
>>>>> the virtual ip address needs to be passed in the payload when the real
>>>>> server is booting up.
>>>>>
>>>>> [1]
>>>>> http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Sajith
>>>>>
>>>>
>>>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead
> WSO2 Inc. (http://wso2.com)
> email  : gayang@wso2.com  | mobile : +94 766819985
>
>



-- 

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email  : gayang@wso2.com  | mobile : +94 766819985

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Gayan Gunarathne <ga...@wso2.com>.
+1 .It is good to have LVS support for Stratos, so world like to contribute
to this.

Will create a new branch from master branch and work on that branch since
features are freeze for 4.1.0 release.After 4.1.0 release we can merge
those changes to the master branch.

Thanks,
Gayan


On Thu, May 7, 2015 at 9:45 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Sajith,
>
> Yes, I missed the scenario where the load balancer runs standalone. An
> extension would be the best approach then.
> On May 4, 2015 2:41 PM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>
>> Hi Chamila,
>>
>> Thanks for the suggestion. But If we use a cartridge agent plugin, then
>> load balancers must be run as cartridges. IMO If we implement as a load
>> balancer extension, then that could be used when the LB is running as a
>> cartridge as well as stand alone mode, interchangeably. ?
>>
>> Thanks,
>> Sajith
>>
>> On Mon, May 4, 2015 at 11:02 AM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>> Hi Sajith,
>>>
>>> +1 for providing this support. AFAIU can't we use a Cartridge Agent
>>> plugin to reconfigure the load balancers as well?
>>> On May 4, 2015 9:38 AM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> I would like to propose LVS load balancer support for Stratos.
>>>>
>>>> In a normal working setup as mentioned in [1], two load balancers (each
>>>> running ipvsadm and keepalived) are paired, one master and one slave.
>>>> Keepalived is configured per pair using vrrp allows the automatic failover
>>>> to let the slave become master if load balancing dies on the master.
>>>> There are N real servers each running the real service located behind
>>>> the load balancer. With Stratos in place, the real servers are orchestrated
>>>> and monitored by Stratos and whenever an extra real server gets added to
>>>> the cluster of real servers (because of scaling up) the load balancers need
>>>> to get updated by Stratos to include the new real server in the load
>>>> balancing decisions. In the same way, if a real server becomes unavailable
>>>> (scaled down), the load balancers need to get updated by Stratos to remove
>>>> the now unavailable server from the load balancing decisions.
>>>>
>>>> This requires load balancer configuration to be updated accordingly to
>>>> reflect new real server (member) IP s, and this can be implemented by
>>>> extending Stratos load balancer extension API. This "plugin" will be
>>>> listenning to the "Topology" topic of Message broker and will update the
>>>> LVS load balancer configuration (both master and slave if present)
>>>> accordingly, either when extra real servers added up in a scale-up or when
>>>> extra real servers removed in scale-down.
>>>>
>>>> In each of real server, the required configuration (bringing up dummy
>>>> interface) can be done via puppet or via a cartridge agent module. For that
>>>> the virtual ip address needs to be passed in the payload when the real
>>>> server is booting up.
>>>>
>>>> [1]
>>>> http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>>>>
>>>>
>>>> Thanks,
>>>> Sajith
>>>>
>>>
>>


-- 

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email  : gayang@wso2.com  | mobile : +94 766819985

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Sajith,

Yes, I missed the scenario where the load balancer runs standalone. An
extension would be the best approach then.
On May 4, 2015 2:41 PM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:

> Hi Chamila,
>
> Thanks for the suggestion. But If we use a cartridge agent plugin, then
> load balancers must be run as cartridges. IMO If we implement as a load
> balancer extension, then that could be used when the LB is running as a
> cartridge as well as stand alone mode, interchangeably. ?
>
> Thanks,
> Sajith
>
> On Mon, May 4, 2015 at 11:02 AM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi Sajith,
>>
>> +1 for providing this support. AFAIU can't we use a Cartridge Agent
>> plugin to reconfigure the load balancers as well?
>> On May 4, 2015 9:38 AM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>>
>>> Hi Devs,
>>>
>>> I would like to propose LVS load balancer support for Stratos.
>>>
>>> In a normal working setup as mentioned in [1], two load balancers (each
>>> running ipvsadm and keepalived) are paired, one master and one slave.
>>> Keepalived is configured per pair using vrrp allows the automatic failover
>>> to let the slave become master if load balancing dies on the master.
>>> There are N real servers each running the real service located behind
>>> the load balancer. With Stratos in place, the real servers are orchestrated
>>> and monitored by Stratos and whenever an extra real server gets added to
>>> the cluster of real servers (because of scaling up) the load balancers need
>>> to get updated by Stratos to include the new real server in the load
>>> balancing decisions. In the same way, if a real server becomes unavailable
>>> (scaled down), the load balancers need to get updated by Stratos to remove
>>> the now unavailable server from the load balancing decisions.
>>>
>>> This requires load balancer configuration to be updated accordingly to
>>> reflect new real server (member) IP s, and this can be implemented by
>>> extending Stratos load balancer extension API. This "plugin" will be
>>> listenning to the "Topology" topic of Message broker and will update the
>>> LVS load balancer configuration (both master and slave if present)
>>> accordingly, either when extra real servers added up in a scale-up or when
>>> extra real servers removed in scale-down.
>>>
>>> In each of real server, the required configuration (bringing up dummy
>>> interface) can be done via puppet or via a cartridge agent module. For that
>>> the virtual ip address needs to be passed in the payload when the real
>>> server is booting up.
>>>
>>> [1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>>>
>>>
>>> Thanks,
>>> Sajith
>>>
>>
>

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Sajith Kariyawasam <sa...@wso2.com>.
Hi Chamila,

Thanks for the suggestion. But If we use a cartridge agent plugin, then
load balancers must be run as cartridges. IMO If we implement as a load
balancer extension, then that could be used when the LB is running as a
cartridge as well as stand alone mode, interchangeably. ?

Thanks,
Sajith

On Mon, May 4, 2015 at 11:02 AM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Sajith,
>
> +1 for providing this support. AFAIU can't we use a Cartridge Agent plugin
> to reconfigure the load balancers as well?
> On May 4, 2015 9:38 AM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:
>
>> Hi Devs,
>>
>> I would like to propose LVS load balancer support for Stratos.
>>
>> In a normal working setup as mentioned in [1], two load balancers (each
>> running ipvsadm and keepalived) are paired, one master and one slave.
>> Keepalived is configured per pair using vrrp allows the automatic failover
>> to let the slave become master if load balancing dies on the master.
>> There are N real servers each running the real service located behind the
>> load balancer. With Stratos in place, the real servers are orchestrated and
>> monitored by Stratos and whenever an extra real server gets added to the
>> cluster of real servers (because of scaling up) the load balancers need to
>> get updated by Stratos to include the new real server in the load balancing
>> decisions. In the same way, if a real server becomes unavailable (scaled
>> down), the load balancers need to get updated by Stratos to remove the now
>> unavailable server from the load balancing decisions.
>>
>> This requires load balancer configuration to be updated accordingly to
>> reflect new real server (member) IP s, and this can be implemented by
>> extending Stratos load balancer extension API. This "plugin" will be
>> listenning to the "Topology" topic of Message broker and will update the
>> LVS load balancer configuration (both master and slave if present)
>> accordingly, either when extra real servers added up in a scale-up or when
>> extra real servers removed in scale-down.
>>
>> In each of real server, the required configuration (bringing up dummy
>> interface) can be done via puppet or via a cartridge agent module. For that
>> the virtual ip address needs to be passed in the payload when the real
>> server is booting up.
>>
>> [1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>>
>>
>> Thanks,
>> Sajith
>>
>

Re: [Proposal] LVS load balancer support for Apache Stratos

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Sajith,

+1 for providing this support. AFAIU can't we use a Cartridge Agent plugin
to reconfigure the load balancers as well?
On May 4, 2015 9:38 AM, "Sajith Kariyawasam" <sa...@wso2.com> wrote:

> Hi Devs,
>
> I would like to propose LVS load balancer support for Stratos.
>
> In a normal working setup as mentioned in [1], two load balancers (each
> running ipvsadm and keepalived) are paired, one master and one slave.
> Keepalived is configured per pair using vrrp allows the automatic failover
> to let the slave become master if load balancing dies on the master.
> There are N real servers each running the real service located behind the
> load balancer. With Stratos in place, the real servers are orchestrated and
> monitored by Stratos and whenever an extra real server gets added to the
> cluster of real servers (because of scaling up) the load balancers need to
> get updated by Stratos to include the new real server in the load balancing
> decisions. In the same way, if a real server becomes unavailable (scaled
> down), the load balancers need to get updated by Stratos to remove the now
> unavailable server from the load balancing decisions.
>
> This requires load balancer configuration to be updated accordingly to
> reflect new real server (member) IP s, and this can be implemented by
> extending Stratos load balancer extension API. This "plugin" will be
> listenning to the "Topology" topic of Message broker and will update the
> LVS load balancer configuration (both master and slave if present)
> accordingly, either when extra real servers added up in a scale-up or when
> extra real servers removed in scale-down.
>
> In each of real server, the required configuration (bringing up dummy
> interface) can be done via puppet or via a cartridge agent module. For that
> the virtual ip address needs to be passed in the payload when the real
> server is booting up.
>
> [1] http://blackbird.si/loadbalancing-failover-with-ipvs-and-keepalived/
>
>
> Thanks,
> Sajith
>