stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Load Balancer Extension API & HAProxy Reference Implementation
Date Wed, 13 Nov 2013 06:32:20 GMT
Hi,

This is a brief introduction to Load Balancer Extension API and its
reference implementation for HAProxy.

The following figure illustrates the Load Balancer Interface which needs to
be implemented for a given load balancer to manage its life-cycle. Please
refer the method comments for details:

[image: Inline image 2]

HAProxy implementation of the above interface could be found at:
https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=blob;f=extensions/load-balancer/haproxy-extension/src/main/java/org/apache/stratos/haproxy/extension/HAProxy.java;h=cdb8bd36a0ab151b0239d86ccefbc77804777eb8;hb=HEAD


The following class: LoadBalancerExtension has been used to execute the
life-cycle of the load balancer.

Work-Flow:
1. Wait for the complete topology event. This will initialize the local
topology data structure once the event is received.
2. Configure and start the load balancer: Invokes LoadBalancer.configure()
and LoadBalancer.start()
3. Listen to Topology Update Events which update load balancer
configuration.
4. Once an event is received, reload load balancer configuration: Invokes
LoadBalancer.reload()
5. When the extension is stopped LoadBalancer.stop() will be invoked.


[image: Inline image 1]


Thanks
Imesh

Mime
View raw message