Thanks a Ton for the response and detailed explanation JB. I used the second approach which takes care of load balancing all services and it works well.
Thanks again, Deepika -----Original Message----- From: Jean-Baptiste Onofré [mailto:[email protected]] Sent: Wednesday, March 10, 2010 6:57 PM To: Deepika Cc: [email protected] Subject: Re: HTTP requests on a servicemix cluster Hi, in fact, the ProxyPass is important and should match your service context root. For example, you should make [...] ServerName lbhost [...] <Proxy balancer://smx_bridge> BalancerMember http://host1:8192/bridge BalancerMember http://host2:8192/bridge </Proxy> ProxyPass /bridge balancer://smx_bridge <Proxy balancer://smx_s2> BalancerMember http://host1:8192/s2 BalancerMember http://host2:8192/s2 </Proxy> ProxyPass /s2 balancer://smx_s2 In that case, http://lbhost/bridge will load balance to bridge service and http://lbhost/s2 will load balance to s2 service. Like this you can "control" what services you want to load balance Another way is to load balance all requests, like this: <Proxy balancer://smx> BalancerMember http://host1:8192/ BalancerMember http://host2:8192/ </Proxy> ProxyPass / balancer://smx Like this, you can use http://lbhost/bridge and http://lbhost/s2 and all new services deployed in ServiceMix instances will available to the load balancer. Regards JB Deepika wrote: > Thanks for the quick response JB. My question was about accessing multiple > Services deployed on the servicemix instances from the mod_proxy_balancer. > For example if service1 is available through 'http://hostname:8192/bridge', > I would enter below lines in httpd.conf: > <Proxy balancer://servicemixcluster> > BalancerMember http://host1:8192/bridge > BalancerMember http://host2:8192/bridge > </Proxy> > ProxyPass /servicemix balancer://servicemixcluster > lbmethod=byrequests > > Now I deploy service2 on host1 and host2 which is available through > 'http://hostname:8192/s2', should I be adding the below lines to http.conf? > or is there another way out to avoid adding the stanza everytime a new > service is deployed? > <Proxy balancer://servicemixcluster1> > BalancerMember http://host1:8192/s2 > BalancerMember http://host2:8192/s2 > </Proxy> > ProxyPass /servicemix1 balancer://servicemixcluster1 > lbmethod=byrequests > > Thanks in advance for your time, > Deepika > > -----Original Message----- > From: Jean-Baptiste Onofré [mailto:[email protected]] > Sent: Wednesday, March 10, 2010 6:26 PM > To: Deepika > Cc: [email protected] > Subject: Re: HTTP requests on a servicemix cluster > > Hi Deepika, > > The mod_proxy_balancer can support more than two balancer members. It > depends on the scheduler algorithm that you use. > You can use request counting, weighted traffic counting and pending > request counting. > You can choose it using the lbmethod. > > For example, if you use lbmethod=byrequests (request counting), the > requests are distributed among the various workers to ensure that each > gets their configured share of the number of requests. It works as follows: > - lbfactor is "worker's work quota" (the share of amount work to be done) > - lbstatus is "how urgent has to work to fulfill its quota of work". > > You can have more information here: > http://httpd.apache.org/docs/2.1/mod/mod_proxy_balancer.html > > Regards > JB > > Deepika wrote: >> Thanks for your response JB. I implemented the mod_proxy_balancer and am > now >> able to load balance the HTTP requests. >> 1 quick question: If I have multiple HTTP Services(say 3) deployed in both >> servicemix1 and servicemix2, should I specify three <Proxy balancer:> sets >> in httpd.conf or should the httpd.conf have the generic urls pointing to >> servicemix instances and the service configuration be done somewhere else? >> >> Thanks for your time on this, >> Deepika >> >> -----Original Message----- >> From: Jean-Baptiste Onofré [mailto:[email protected]] >> Sent: Friday, February 26, 2010 8:50 PM >> To: [email protected] >> Subject: Re: HTTP requests on a servicemix cluster >> >> Hi Deepika, >> >> I guess that you point http://servicemix1:port/... >> >> In that case, only the servicemix1 node will manage your request. >> >> It's not ServiceMix which manage this. You need to add a kind of load >> balancer in front on ServiceMix. >> This load balancer could be hardware (F5, Cisco) or software. >> >> For example, using Apache mod_proxy_balancer, you can use something like: >> >> <Proxy balancer://servicemixcluster> >> BalancerMember http://servicemix1:8181 >> BalancerMember http://servicemix2:8181 >> </Proxy> >> ProxyPass /servicemix balancer://servicemixcluster >> >> Regards >> JB >> >> Deepika wrote: >>> Hi All, >>> >>> I am using SMX 3.3.1 on Windows XP and am learning on the cluster >>> functionality available. >>> I have two servicemix instances in cluster. I have tested clustering >>> functionality in the following way: >>> Deployed a file poller,sender service assembly on both the instances. > Both >>> instances are polling on the same directory(a shared folder). When I put >>> sample xmls in the poller directory, I see that some files are processed >> by >>> servicemix1 and others by the instance servicemix2. >>> >>> But when I deployed a HTTP example on both instances, I observed that all >>> the HTTP requests are being processed only by servicemix1. What >>> configuration is required for the HTTP requests to be processed by both >> the >>> servicemix instances? Is it possible with the SMX 3.3.1 install alone? >>> >>> Thanks in Advance, >>> Deepika >>> >
