I think we are getting closer to the solution :), but:
- The load balancers at level 1 (i.e. LB1, ...., LBn) are running
Axis2 (custom), not Synapse. I don't think it makes a lot of
difference, does it?
- What is the purpose of step # 1? I don't want to achieve
replication, I only want to add new machines at runtime, if needed
(i.e. Amazon EC2 instances).
- Should I customize the axis2.xml file or the synapse.xml on LB0?
(step # 2)
- How do I plug my custom routing policies in LB0? (step # 3)
Thanks,
Michele
On 21 Oct 2008, at 04:34, Afkham Azeez wrote:
The way I understand it, this is what needs to be done.
You have two levels of load balancers. At L0, you have the LB0 load
balancer. At L1, you have LB1, LB2, LB3... LBn. I'll assume that L0
& L1
load balancers are Synapse.
Here is how such a deployment can be setup.
1. All L1 load balancers belong to the L1 group. This can be done by
enabling clustering in the axis2.xml file of each L1 load balancer,
setting
it to load balancer mode, and specifying that these load balancers
belong to
the L1 group. These changes have to be made to the cluster
configuration
section in the axis2.xml file. You need to specify the
applicationDomains
across which each L1 load balancer spreads the load.
2. Enable load balancer mode in the LB0 load balancer. Specify that
the
applicationDomain across which the load has to be balanced as L1.
Now, you
can add new L1 load balancers at runtime, provided that they are
always
added to the L1 group.
3. Write your own LB algorithm, that will implement your load
balancing
policy & plug it into the LB0 load balancer. The algorithm can be
specified
in the dynamic load balancer configuration section in the
synapse.xml file.
The default algorithm is round-robin, which will not be suitable in
your
case.
I'd recommend that you take a look at the dynamic load balancing
sample
documentation to get a better idea.
HTH
Azeez
On Mon, Oct 20, 2008 at 8:54 PM, Michele Mazzucco <
[EMAIL PROTECTED]> wrote:
Hi Azeez,
I think you misunderstood my requirements.
I have different clusters (i.e. bunch of machines) exposing a certain
number of web services. Each cluster has its own load balancer,
policies,
etc.
What I want is add another layer of indirection. Requests will pass
through synapse and will be forwarded to the load balancers,
according to my
own policies. I want to be able to dynamically add new clusters at
runtime.
The final scenario is:
Synapse------------>LB1--------> cluster 1
------------>LB2 -------> cluster 2
etc.
That is, clients send requests to the synapse machine, which will
forward
them to a certain load balancer LBn, which in turn will forward
them to
certain servers for execution.
Hope everything is clear now.
Michele
On 20 Oct 2008, at 15:49, Afkham Azeez wrote:
Hi Michele,
You requirement seems to be dynamic groups. In Synapse we support
dynamic
membership within specified groups. I think what you mean by "new
cluster"
is actually a "new group". I don't think it is practically
possible to
dynamically add a new group at runtime.
For dynamic load balancing with dynamic membership (with static
groups),
check out Synapse sample #57.
I hope that I have understood your question correctly.
HTH
Azeez
On Mon, Oct 20, 2008 at 7:28 PM, Michele Mazzucco <
[EMAIL PROTECTED]> wrote:
Hi all,
I'd like to use Synapse for load balancing across different
clusters. In
particular, I want not only to implement my own routing policy
(which I
know
it's possible), but also to add new clusters at runtime (i.e. the
possible
destinations are not specified into a xml file).
I know I can implement it using just Axis2, but I was wondering
whether
it
is possible to use Synapse (i.e. write less code). If this is
the case,
I'd
really appreciate some pointers (I know Axis2 very well, but not
Synapse).
Thanks in advance,
Michele
--
Thanks
Afkham Azeez
Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
--
Thanks
Afkham Azeez
Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760