Re: [users@httpd] load balancing

2011-09-07 Thread Mark Wiltshire
Have you see this

http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html

R

Mark
On 7 Sep 2011, at 13:47, Amira Othman wrote:

Hi all,
I am using httpd-2.2.3-43.el5.1.vm on centos 5.6 I want to add another  web 
server to act as web farm. I want to use mod_proxy for load balancing between 
servers but I don’t know how.any one can help me in this issue ?
 
Regards
Amira Othman
Server Administrator
www.cairosource.com
 



6 EL Nil EL Abyad, Mohandiseen
Cairo, Egypt
Direct: +2 02 3303 7175
Mobile:   +2 012 220 4165
 

The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error please 
contact the sender and delete the material from any computer.
 
 




RE: [users@httpd] load balancing

2011-09-07 Thread Kashif Rahman
You can install another apache and run it on different IP or if same IP then
have different port, then that would work for you.

 

Thank you,

 

Best Regards,


Kashif Rahman

Principal SCM Engineer

cid:image001.jpg@01CBB64A.A77B4560

 

Vopium A/S | Office# 2, 7th Floor, Shaheen Complex | 38 Abbot Road

Lahore | Pakistan | t + 92 42 6316491 | f + 92 42 6316492

 

imagesCAV9FMB1 + 92 334 9771227 | imagesCAXWPPLS kashif_r | w
www.vopium.com  

 

From: Amira Othman [mailto:a.oth...@cairosource.com] 
Sent: Wednesday, September 07, 2011 5:47 PM
To: users@httpd.apache.org
Subject: [users@httpd] load balancing

 

Hi all,

I am using httpd-2.2.3-43.el5.1.vm on centos 5.6 I want to add another  web
server to act as web farm. I want to use mod_proxy for load balancing
between servers but I don't know how.any one can help me in this issue ?

 

Regards


Amira Othman

Server Administrator

  www.cairosource.com

 



6 EL Nil EL Abyad, Mohandiseen 

Cairo, Egypt

Direct: +2 02 3303 7175
Mobile:   +2 012 220 4165

 

The information transmitted is intended solely for the individual or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you have received this email
in error please contact the sender and delete the material from any
computer.

 

 

<><><><>

Re: [users@httpd] Load balancing

2012-10-16 Thread Eric Covener
On Tue, Oct 16, 2012 at 5:57 PM, Dionisio Cortes Fernandez
 wrote:
> Hi,
>
> I´ve been trying to make a load balanced Apache servet without all the
> success I wanted. I used this mods
>
> proxy
> proxy_balancer
> proxy_http
> status
>
> And I get a main server that balances the load, to the other nodes, that
> it´s not at all, the solution I wanted.
>
>   
>  |weblb___|
>|  |
>|  |
>   _||__
>  |   web1 ||  web2|
>  |_||__|
>
> I don´t really like the solution because as far as I know, all the web
> traffic is through weblb (because web1 and web2 only have one NIC and its in
> a internal network with weblb, and i see their pages), and I wanted weblb
> only to distribute the petitions, and later web1 and web2 act as normal
> servers, so for example, half of user will use web1, and the other half
> web2, but they only know one ip address (weblb). I know this should be
> possible as facebook or google or that big companies uses lots of machines
> and you only know one domain, and I don´t think they use that schema,
> because only one server couldn´t have all throughput needed to all users.
>
> So I don´t know if I´m trying with the wrong approach or there are any other
> modules that I can use to do what I want.

Maybe you want a layer 2 load balancer, or "ip sprayer", not a layer 7
HTTP proxy.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing

2012-10-17 Thread Dionisio Cortes Fernandez
Thanks Eric, I´m going to see that

2012/10/17 Eric Covener 

> On Tue, Oct 16, 2012 at 5:57 PM, Dionisio Cortes Fernandez
>  wrote:
> > Hi,
> >
> > I´ve been trying to make a load balanced Apache servet without all the
> > success I wanted. I used this mods
> >
> > proxy
> > proxy_balancer
> > proxy_http
> > status
> >
> > And I get a main server that balances the load, to the other nodes, that
> > it´s not at all, the solution I wanted.
> >
> >   
> >  |weblb___|
> >|  |
> >|  |
> >   _||__
> >  |   web1 ||  web2|
> >  |_||__|
> >
> > I don´t really like the solution because as far as I know, all the web
> > traffic is through weblb (because web1 and web2 only have one NIC and
> its in
> > a internal network with weblb, and i see their pages), and I wanted weblb
> > only to distribute the petitions, and later web1 and web2 act as normal
> > servers, so for example, half of user will use web1, and the other half
> > web2, but they only know one ip address (weblb). I know this should be
> > possible as facebook or google or that big companies uses lots of
> machines
> > and you only know one domain, and I don´t think they use that schema,
> > because only one server couldn´t have all throughput needed to all users.
> >
> > So I don´t know if I´m trying with the wrong approach or there are any
> other
> > modules that I can use to do what I want.
>
> Maybe you want a layer 2 load balancer, or "ip sprayer", not a layer 7
> HTTP proxy.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] Load Balancing question

2011-08-03 Thread aceror
Check this, maybe help

http://www.issociate.de/board/post/478439/mod_rewrite_
+_mod_proxy_trouble.html



El mié, 03-08-2011 a las 12:47 -0500, Jeff Poling escribió:
> We are using apache to load balance many of our web sites.  Over the
> last few weeks, we have migrated sites to new back end servers.  With
> the latest round of migrations (our busiest sites), I am seeing
> significant performance issues on one of the back end servers.  After
> some investigation, I found that it appears apache is sending the vast
> majority of requests to the very busy back end server.
> 
>  
> 
> Further investigation revealed that the configuration for my sites
> differs from what is in balancer-manager.  For example:
> 
>  
> 
> BalancerMember http://mysite1.myorg.com route=1
> 
> BalancerMember http://mysite2.myorg.com route=2
> 
>  
> 
> However, if I go to http://myorg.com/balancer-manager, I see:
> 
>  
> 
> http://mysite1.myorg.com has a route of 2
> 
> http://mysite2.myorg.com has a route of 1
> 
>  
> 
> So balancer manager is opposite of the config file.  In other cases,
> balancer-manager has the same route defined for each back end server.
> 
>  
> 
> Something is very odd.  Has anyone seen this before? What would be the
> recommended way to correct it?
> 
>  
> 
> Thanks,
> 
>  
> 
> Jeff
> 
>  
> 
> Jeffrey Poling
> 
> System Administrator | Information Systems
> 
> Moody Bible Institute
> 
> 820 N. LaSalle Blvd., Chicago, IL 60610
> 
> 312-329-8968
> 
> www.moodyministries.net
> 
> From the Word. To Life.
> 
>  
> 
> 



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Load Balancing question

2011-08-03 Thread Jeff Poling
Thanks.  For whatever reason, an apachectl stop and an apachectl start 
corrected the issue- the balancer-manager now reflects the config in the config 
file

Jeffrey Poling
System Administrator | Information Systems
Moody Bible Institute
820 N. LaSalle Blvd., Chicago, IL 60610
312-329-8968
www.moodyministries.net
From the Word. To Life.

> -Original Message-
> From: aceror [mailto:aceror2...@yahoo.es]
> Sent: Wednesday, August 03, 2011 6:12 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Load Balancing question
> 
> Check this, maybe help
> 
> http://www.issociate.de/board/post/478439/mod_rewrite_
> +_mod_proxy_trouble.html
> 
> 
> 
> El mié, 03-08-2011 a las 12:47 -0500, Jeff Poling escribió:
> > We are using apache to load balance many of our web sites.  Over the
> > last few weeks, we have migrated sites to new back end servers.  With
> > the latest round of migrations (our busiest sites), I am seeing
> > significant performance issues on one of the back end servers.  After
> > some investigation, I found that it appears apache is sending the vast
> > majority of requests to the very busy back end server.
> >
> >
> >
> > Further investigation revealed that the configuration for my sites
> > differs from what is in balancer-manager.  For example:
> >
> >
> >
> > BalancerMember http://mysite1.myorg.com route=1
> >
> > BalancerMember http://mysite2.myorg.com route=2
> >
> >
> >
> > However, if I go to http://myorg.com/balancer-manager, I see:
> >
> >
> >
> > http://mysite1.myorg.com has a route of 2
> >
> > http://mysite2.myorg.com has a route of 1
> >
> >
> >
> > So balancer manager is opposite of the config file.  In other cases,
> > balancer-manager has the same route defined for each back end server.
> >
> >
> >
> > Something is very odd.  Has anyone seen this before? What would be the
> > recommended way to correct it?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Jeff
> >
> >
> >
> > Jeffrey Poling
> >
> > System Administrator | Information Systems
> >
> > Moody Bible Institute
> >
> > 820 N. LaSalle Blvd., Chicago, IL 60610
> >
> > 312-329-8968
> >
> > www.moodyministries.net
> >
> > From the Word. To Life.
> >
> >
> >
> >
> 
> 
> 
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>"   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing question

2011-08-04 Thread Tom Evans
On Thu, Aug 4, 2011 at 2:14 AM, Jeff Poling  wrote:
> Thanks.  For whatever reason, an apachectl stop and an apachectl start 
> corrected the issue- the balancer-manager now reflects the config in the 
> config file
>

mod_proxy_balancer is dangerous to use when doing graceful restarts.
The state of the balancers is saved, and then re-applied, however
various things can cause the settings to be applied to a different
balancer member.

This is a long standing bug, and hence (I presume) quite hard to fix.
These bug reports describe it

https://issues.apache.org/bugzilla/show_bug.cgi?id=44736
https://issues.apache.org/bugzilla/show_bug.cgi?id=45950

The only solutions are:

1) Don't use mod_proxy_balancer. Proxy to a local instance of ha-proxy
or varnish running on localhost, and use that to manage your backends
or
2) Don't use graceful restarts.

Both suck. You'll see the bug dates back over 3 years, and there is no
intention to fix it as far as I know. At $JOB, we're stopping using
mod_proxy_balancer now, we're slowly migrating each balancer to
ha-proxy.

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Load Balancing question

2011-08-04 Thread Jeff Poling
Tom,

> mod_proxy_balancer is dangerous to use when doing graceful restarts.
> The state of the balancers is saved, and then re-applied, however various
> things can cause the settings to be applied to a different balancer member.

Thanks for the information on the bugs.  I really appreciate it! We often use 
graceful restarts - now I know I need to alter my procedure somewhat.

Jeff


Re: [users@httpd] Load Balancing question

2011-08-04 Thread Jim Jagielski

On Aug 4, 2011, at 7:40 AM, Tom Evans wrote:

> On Thu, Aug 4, 2011 at 2:14 AM, Jeff Poling  wrote:
>> Thanks.  For whatever reason, an apachectl stop and an apachectl start 
>> corrected the issue- the balancer-manager now reflects the config in the 
>> config file
>> 
> 
> mod_proxy_balancer is dangerous to use when doing graceful restarts.
> The state of the balancers is saved, and then re-applied, however
> various things can cause the settings to be applied to a different
> balancer member.
> 
> This is a long standing bug, and hence (I presume) quite hard to fix.
> These bug reports describe it
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=44736
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45950
> 
> The only solutions are:
> 
> 1) Don't use mod_proxy_balancer. Proxy to a local instance of ha-proxy
> or varnish running on localhost, and use that to manage your backends
> or
> 2) Don't use graceful restarts.
> 
> Both suck. You'll see the bug dates back over 3 years, and there is no
> intention to fix it as far as I know. At $JOB, we're stopping using
> mod_proxy_balancer now, we're slowly migrating each balancer to
> ha-proxy.
> 

You will note that the balancer in 2.3/2.4 resolves this issue.

BTW, the idea that mod_proxy_balancer is "broken" only means that
it does not do what you expect, which is restore all local mods
made via balancer_manager, but this was never guaranteed.


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing question

2011-08-04 Thread Tom Evans
On Thu, Aug 4, 2011 at 3:43 PM, Jim Jagielski  wrote:
> You will note that the balancer in 2.3/2.4 resolves this issue.
>
> BTW, the idea that mod_proxy_balancer is "broken" only means that
> it does not do what you expect, which is restore all local mods
> made via balancer_manager, but this was never guaranteed.
>
>

No, it applies state randomly and indiscriminately. The first time
this happened to us, one balancer cluster ended up with all backends
enabled, when only one was before the graceful restart, and yet
another had all backends disabled, when one should have been.

IE, it left the balancer members in a state where it was neither the
configuration on disk, nor the configuration before restart. That is
what I call broken - an entirely unpredictable state.

Given that load balancers are typically used to increase availability
and reliability of a web service, a load balancer which consistently
screws up the state is about as useful as an umbrella with holes in
it.

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing question

2011-08-04 Thread Jim Jagielski
Hence the reason for the rewrite in 2.3/2.4.

Balancer-manager in prev versions was NEVER intended for
long-term usage. The issue is in the interaction of balancer-manager
and mod_proxy_balancer, not the balancer itself.

On Aug 4, 2011, at 10:57 AM, Tom Evans wrote:

> On Thu, Aug 4, 2011 at 3:43 PM, Jim Jagielski  wrote:
>> You will note that the balancer in 2.3/2.4 resolves this issue.
>> 
>> BTW, the idea that mod_proxy_balancer is "broken" only means that
>> it does not do what you expect, which is restore all local mods
>> made via balancer_manager, but this was never guaranteed.
>> 
>> 
> 
> No, it applies state randomly and indiscriminately. The first time
> this happened to us, one balancer cluster ended up with all backends
> enabled, when only one was before the graceful restart, and yet
> another had all backends disabled, when one should have been.
> 
> IE, it left the balancer members in a state where it was neither the
> configuration on disk, nor the configuration before restart. That is
> what I call broken - an entirely unpredictable state.
> 
> Given that load balancers are typically used to increase availability
> and reliability of a web service, a load balancer which consistently
> screws up the state is about as useful as an umbrella with holes in
> it.
> 
> Cheers
> 
> Tom
> 
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
> 


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing mod_webdav?

2011-03-30 Thread Igor Galić


- Original Message -
> This may be a stupid idea, but has anyone had any experience
> load-balancing two Apache (2.2 in our case) servers that are running
> mod_dav?  We've searched and searched and it looks like it's just
> something that no one at all talks about.

I've been thinking about this for some time, but then decided that
it's generally a stupid idea.
Mostly because there are a couple dozen of Dav clients and all of
them have their own interpretation of how to speak to a Dav Server.

My idea back then was to have subversion read/write -- but that
seems like a terribly stupid idea because you have no way to split
it up properly.

> We've got a setup in production where we've got Apache 2.2.17 servers

That sounds like a bad idea. Have you considered starting with test?

> on two different machines (1 per machine) ,identical, each with

What kind of storage do they sit on? This is crucial, because
mod_dav works with FS locks.

> mod_dav.  They're both sitting behind a hardware load-balancer that
> does a port rewrite sending traffic to only one of the two.  We'd
> like to let it round-robin between both, but were unsure whether
> that was safe/wise/possible.

Round-robin seems like the best idea, but only if you enable
sticky sessions.

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing mod_webdav?

2011-03-30 Thread Nick Tkach
- Original Message -
> - Original Message -
> > This may be a stupid idea, but has anyone had any experience
> > load-balancing two Apache (2.2 in our case) servers that are running
> > mod_dav? We've searched and searched and it looks like it's just
> > something that no one at all talks about.
> 
> I've been thinking about this for some time, but then decided that
> it's generally a stupid idea.
> Mostly because there are a couple dozen of Dav clients and all of
> them have their own interpretation of how to speak to a Dav Server.

Good point, we've definitely run into that!
> 
> My idea back then was to have subversion read/write -- but that
> seems like a terribly stupid idea because you have no way to split
> it up properly.
> 
> > We've got a setup in production where we've got Apache 2.2.17
> > servers
> 
> That sounds like a bad idea. Have you considered starting with test?
> 
Oh yeah, we tested the one-at-a-time setup like we're using in test first.  
This is the result of that, not the start! :)

> > on two different machines (1 per machine) ,identical, each with
> 
> What kind of storage do they sit on? This is crucial, because
> mod_dav works with FS locks.
> 

Well, that complicates it I'm sure.  They've actually both got an NFS mount 
from a different box mounted as their WebDAV root.  The thing there is, why 
exactly is that a bad idea?  Is it "just" a matter of getting one file 
over-writing another one potentially or do you risk more serious issues than 
that?

Yes, we certainly could/should try FTP, SFTP/SSH, or SMB, but for a couple of 
reasons (partly work-flow, partly security) we'd rejected those.  We wound up 
at WebDAV only because it seemed like the only thing left.  We'd be open to any 
other ideas though.


> > mod_dav. They're both sitting behind a hardware load-balancer that
> > does a port rewrite sending traffic to only one of the two. We'd
> > like to let it round-robin between both, but were unsure whether
> > that was safe/wise/possible.
> 
> Round-robin seems like the best idea, but only if you enable
> sticky sessions.
> 

That's the thing though, given all the little quirks of WebDAV, the various 
issue with clients, and the NFS mount, is that safe/possible to let them 
round-robin?


Thanks!

> i
> 
> --
> Igor Galić
> 
> Tel: +43 (0) 664 886 22 883
> Mail: i.ga...@brainsware.org
> URL: http://brainsware.org/
> 
> -
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> " from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing for REST service

2012-03-07 Thread Daniel Ruggeri
On 3/7/2012 4:47 PM, Brian Lauber wrote:
> Howdy.
>
> We have a REST service that we are attempting to load balance via 
> mod_proxy_balancer.  Unfortunately, we have been unable to figure out how to 
> maintain the session stickiness across REST service calls.  In particular, 
> our REST service does not make use of cookies or URL query parameters, which 
> are the traditional means for communicating session-related information.
>
> Ideally, we would like to maintain the session stickiness based upon the 
> client's IP address; however, we're open to other suggestions as well 
> (including using a different load balancing plugin).  Our main goal is to 
> figure out how to load balance the REST service in a manner that will be 
> transparent to the existing REST clients.
>
> Any suggestions would be appreciated.  Thanks in advance!
>
>  -=- Brian
>

Brian;
   Here is a simple snippet that will use mod_headers as well as
mod_proxy_balancer to implement a cookie-based solution. In my
experiences, this works across many different types of clients (so long
as they accept cookies) and all types of backend services.

LoadModule headers_module modules/mod_headers.so

   BalancerMember http://1.2.3.4:8009 route=mercury
   BalancerMember http://1.2.3.5:8009 route=venus
   ProxySet stickysession=DanielsApp_STICKY

Header add Set-Cookie
"DanielsApp_STICKY=sticky.%{BALANCER_WORKER_ROUTE}e;path=/;"
env=BALANCER_ROUTE_CHANGED

ProxyPass /daniel/ balancer://DanielCluster/daniel/


For reference (and other proxy examples), I pulled this straight from a
presentation I gave at ACNA2010 here:
http://people.apache.org/~druggeri/notes/ApacheConNA%202010%20Presentation.odp
http://people.apache.org/~druggeri/notes/ApacheConNA%202010%20Presentation.ppt

-- 
Daniel Ruggeri


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Load Balancing for REST service

2012-03-07 Thread Brian Lauber
Thanks for the quick response.  I think this will work for at least some of the 
REST clients, but we do have a handful of clients that do not accept cookies.  
In the worst case, I suppose we'll just need to push an update to these clients 
so that they become cookie-aware.

I was unable to access the presentations that you referenced in your response.  
It appears that anonymous users are not authorized to view these files.  If you 
get the chance, could you please make these presentations available to me?

Thanks!

  -=- Brian


> -Original Message-
> From: Daniel Ruggeri [mailto:drugg...@primary.net]
> Sent: Wednesday, March 07, 2012 6:59 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Load Balancing for REST service
> 
> On 3/7/2012 4:47 PM, Brian Lauber wrote:
> > Howdy.
> >
> > We have a REST service that we are attempting to load balance via
> mod_proxy_balancer.  Unfortunately, we have been unable to figure out
> how to maintain the session stickiness across REST service calls.  In 
> particular,
> our REST service does not make use of cookies or URL query parameters,
> which are the traditional means for communicating session-related
> information.
> >
> > Ideally, we would like to maintain the session stickiness based upon the
> client's IP address; however, we're open to other suggestions as well
> (including using a different load balancing plugin).  Our main goal is to 
> figure
> out how to load balance the REST service in a manner that will be transparent
> to the existing REST clients.
> >
> > Any suggestions would be appreciated.  Thanks in advance!
> >
> >  -=- Brian
> >
> 
> Brian;
>Here is a simple snippet that will use mod_headers as well as
> mod_proxy_balancer to implement a cookie-based solution. In my
> experiences, this works across many different types of clients (so long as
> they accept cookies) and all types of backend services.
> 
> LoadModule headers_module modules/mod_headers.so  balancer://DanielCluster>
>BalancerMember http://1.2.3.4:8009 route=mercury
>BalancerMember http://1.2.3.5:8009 route=venus
>ProxySet stickysession=DanielsApp_STICKY  Header add Set-
> Cookie
> "DanielsApp_STICKY=sticky.%{BALANCER_WORKER_ROUTE}e;path=/;"
> env=BALANCER_ROUTE_CHANGED
> 
> ProxyPass /daniel/ balancer://DanielCluster/daniel/
> 
> 
> For reference (and other proxy examples), I pulled this straight from a
> presentation I gave at ACNA2010 here:
> http://people.apache.org/~druggeri/notes/ApacheConNA%202010%20Pres
> entation.odp
> http://people.apache.org/~druggeri/notes/ApacheConNA%202010%20Pres
> entation.ppt
> 
> --
> Daniel Ruggeri
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing for REST service

2012-03-08 Thread Daniel Ruggeri
On 3/7/2012 8:39 PM, Brian Lauber wrote:
> I was unable to access the presentations that you referenced in your 
> response.  It appears that anonymous users are not authorized to view these 
> files.  If you get the chance, could you please make these presentations 
> available to me?

My mistake. Simple permissions issue - should be fine now.

-- 
Daniel Ruggeri


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



RE: [users@httpd] Load Balancing for REST service

2012-03-08 Thread Brian Lauber
That did the trick.  Thanks!

 -=- Brian

From: Daniel Ruggeri [drugg...@primary.net]
Sent: Thursday, March 08, 2012 6:41 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Load Balancing for REST service

On 3/7/2012 8:39 PM, Brian Lauber wrote:
> I was unable to access the presentations that you referenced in your 
> response.  It appears that anonymous users are not authorized to view these 
> files.  If you get the chance, could you please make these presentations 
> available to me?

My mistake. Simple permissions issue - should be fine now.

--
Daniel Ruggeri


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing based on header value

2016-03-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Niranjan,

On 3/30/16 2:15 PM, Niranjan Rao wrote:
> Greetings,
> 
> My first post to this mailing list.
> 
> I have apache2 load balancing working perfectly based on session 
> affinity. Traffic does get directed properly to appropriate tomcat
> server.
> 
> We are trying to use same servers to serve some REST API calls.
> These calls don't have a session, however tomcat honouring the
> request does maintain some state and we would like to redirect the
> traffic to same tomcat based on some header value.
> 
> Tried searching and reading documents from apache web site, but
> have not figured it out yet.
> 
> Can I load balance based on header value? It seems to be doable,
> but could not find any example or how-to.

Which module are you using to proxy httpd -> Tomcat?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlb8H+0ACgkQ9CaO5/Lv0PC5EACgusxMWIhLosqqSi2GTgS/wCCE
1bgAnilhfPcRq1iZkLRibCHsKuZfkuFF
=vb8S
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing based on header value

2016-03-30 Thread Niranjan Rao

I am using AJP to connect to tomcat.

Entry in the config file looks like


BalancerMember ajp://myserver:8009 route=node2
ProxySet lbmethod=bytraffic
ProxySet stickysession=JSESSIONID
 

Hope this answers your question.

Regards,

Niranjan
On 03/30/2016 11:50 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Niranjan,

On 3/30/16 2:15 PM, Niranjan Rao wrote:

Greetings,

My first post to this mailing list.

I have apache2 load balancing working perfectly based on session
affinity. Traffic does get directed properly to appropriate tomcat
server.

We are trying to use same servers to serve some REST API calls.
These calls don't have a session, however tomcat honouring the
request does maintain some state and we would like to redirect the
traffic to same tomcat based on some header value.

Tried searching and reading documents from apache web site, but
have not figured it out yet.

Can I load balance based on header value? It seems to be doable,
but could not find any example or how-to.

Which module are you using to proxy httpd -> Tomcat?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlb8H+0ACgkQ9CaO5/Lv0PC5EACgusxMWIhLosqqSi2GTgS/wCCE
1bgAnilhfPcRq1iZkLRibCHsKuZfkuFF
=vb8S
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing based on header value

2016-03-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Niranjan,

On 3/30/16 3:02 PM, Niranjan Rao wrote:
> I am using AJP to connect to tomcat.
> 
> Entry in the config file looks like
> 
>  BalancerMember ajp://myserver:8009
> route=node2 ProxySet lbmethod=bytraffic ProxySet
> stickysession=JSESSIONID 
> 
> Hope this answers your question.

Okay, so you are using mod_proxy_ajp.

I'm not sure how to do it in mod_proxy_ajp, but mod_jk allows the
request to override the worker to be used. I believe if you set the
JK_WORKER_NAME environment variable (for mod_jk only) that worker name
will be used. You can use whatever means in httpd to set that variable
such as mod_rewrite, etc.

I would imagine that there is a similar facility in mod_proxy_ajp.

- -chris

> On 3/30/16 2:15 PM, Niranjan Rao wrote:
 Greetings,
 
 My first post to this mailing list.
 
 I have apache2 load balancing working perfectly based on
 session affinity. Traffic does get directed properly to
 appropriate tomcat server.
 
 We are trying to use same servers to serve some REST API
 calls. These calls don't have a session, however tomcat
 honouring the request does maintain some state and we would
 like to redirect the traffic to same tomcat based on some
 header value.
 
 Tried searching and reading documents from apache web site,
 but have not figured it out yet.
 
 Can I load balance based on header value? It seems to be
 doable, but could not find any example or how-to.
> Which module are you using to proxy httpd -> Tomcat?
> 
> -chris
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>> 
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlb8LhYACgkQ9CaO5/Lv0PAA1ACcC9BuizMCiIORYNyCgeQ9Vt+5
CeMAn3qo01HeRt9VRbKBVy1QXZrEL6y/
=ffky
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load-balancing with Mod_Proxy and SSL problem

2012-07-12 Thread Daniel Gruno
On 07/12/2012 02:42 PM, Jehan Badshah wrote:
> HI
> 
> *for loadbalancing I added following lines in httpd-ssl.conf file *
> 
> 
> //certificates etc
> 
> //loadbalancing lines
> ProxyPass / balancer://sakaiCluster/ stickysession=JSESSIONID
> nofailover=On timeout=60
> 
> BalancerMember ajp://192.168.1.101:8009
>  route=tom121
> BalancerMember ajp://192.168.1.102:8009
>  route=tom122
>
> 
> 
> 
> *when I am running apache then getting following syntax error*
> 
> AH00526: Syntax error on line 247 of httpd-ssl.conf:
> ProxyPass Can't find 'byrequests' lb method
> 
> 
> *Following are Loaded Modules:*
>  core_module (static)
>  so_module (static)
>  http_module (static)
>  mpm_event_module (static)
>  authn_file_module (shared)
>  authn_core_module (shared)
>  authz_host_module (shared)
>  authz_groupfile_module (shared)
>  authz_user_module (shared)
>  authz_core_module (shared)
>  access_compat_module (shared)
>  auth_basic_module (shared)
>  socache_shmcb_module (shared)
>  reqtimeout_module (shared)
>  filter_module (shared)
>  mime_module (shared)
>  log_config_module (shared)
>  env_module (shared)
>  headers_module (shared)
>  setenvif_module (shared)
>  version_module (shared)
>  slotmem_shm_module (shared)
>  ssl_module (shared)
>  unixd_module (shared)
>  status_module (shared)
>  autoindex_module (shared)
>  dir_module (shared)
>  alias_module (shared)
>  proxy_module (shared)
>  proxy_balancer_module (shared)
>  proxy_ajp_module (shared)
>  proxy_http_module (shared)
> 
> Any help ?
> 
> 
> Regards
> 
> Jehan
> 
> 
You need to load mod_lbmethod_byrequests :)

LoadModule lbmethod_byrequests_module /path/mod_lbmethod_byrequests.so

With regards,
Daniel.


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load-balancing with Mod_Proxy and SSL problem

2012-07-12 Thread Jehan Badshah
Thanks Daniel

Now syntax errors are fixed, but apache is not starting, following is error
log

[Fri Jul 13 23:07:52.976414 2012] [lbmethod_heartbeat:notice] [pid
12579:tid 3086534336] AH02282: No slotmem from mod_heartmonitor
[Fri Jul 13 23:07:52.977220 2012] [proxy_balancer:emerg] [pid 12579:tid
3086534336] (22)Invalid argument: AH01186: worker slotmem_grab failed
[Fri Jul 13 23:07:52.977252 2012] [:emerg] [pid 12579:tid 3086534336]
AH00020: Configuration Failed, exiting
[root@localhost ~]#



On Thu, Jul 12, 2012 at 5:48 PM, Daniel Gruno  wrote:

> On 07/12/2012 02:42 PM, Jehan Badshah wrote:
> > HI
> >
> > *for loadbalancing I added following lines in httpd-ssl.conf file *
> >
> > 
> > //certificates etc
> >
> > //loadbalancing lines
> > ProxyPass / balancer://sakaiCluster/ stickysession=JSESSIONID
> > nofailover=On timeout=60
> > 
> > BalancerMember ajp://192.168.1.101:8009
> >  route=tom121
> > BalancerMember ajp://192.168.1.102:8009
> >  route=tom122
> >
> >
> > 
> >
> > *when I am running apache then getting following syntax error*
> >
> > AH00526: Syntax error on line 247 of httpd-ssl.conf:
> > ProxyPass Can't find 'byrequests' lb method
> >
> >
> > *Following are Loaded Modules:*
> >  core_module (static)
> >  so_module (static)
> >  http_module (static)
> >  mpm_event_module (static)
> >  authn_file_module (shared)
> >  authn_core_module (shared)
> >  authz_host_module (shared)
> >  authz_groupfile_module (shared)
> >  authz_user_module (shared)
> >  authz_core_module (shared)
> >  access_compat_module (shared)
> >  auth_basic_module (shared)
> >  socache_shmcb_module (shared)
> >  reqtimeout_module (shared)
> >  filter_module (shared)
> >  mime_module (shared)
> >  log_config_module (shared)
> >  env_module (shared)
> >  headers_module (shared)
> >  setenvif_module (shared)
> >  version_module (shared)
> >  slotmem_shm_module (shared)
> >  ssl_module (shared)
> >  unixd_module (shared)
> >  status_module (shared)
> >  autoindex_module (shared)
> >  dir_module (shared)
> >  alias_module (shared)
> >  proxy_module (shared)
> >  proxy_balancer_module (shared)
> >  proxy_ajp_module (shared)
> >  proxy_http_module (shared)
> >
> > Any help ?
> >
> >
> > Regards
> > 
> > Jehan
> >
> >
> You need to load mod_lbmethod_byrequests :)
>
> LoadModule lbmethod_byrequests_module /path/mod_lbmethod_byrequests.so
>
> With regards,
> Daniel.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


-- 

Regards

Jehan Badshah | Sr. Software Engineer & Team Lead
Department of Research & Development
National University of Computer and Emerging Sciences
A.K. Brohi Road, H-11/4, Islamabad
UAN: +92 (0)51 - 111 128 128 ext 344


Re: [users@httpd] Load balancing with load detection on backend servers ?

2014-11-20 Thread Jim Jagielski
The only real question is how the load value of the backend
systems can be known and then "told" to Apache. I had proposed
awhile ago using some sort of custom HTTP X-header to send that
info.

> On Nov 19, 2014, at 3:28 AM, ulrich.her...@t-systems.com wrote:
> 
> Hi all,
>  
> I know the load_balancing-policies bybusyness, byrequests, bytraffic and 
> heartbeat.
>  
> We have a frontend apache, that acts as forwarding proxy to 8 backend servers.
> BUT: We want do route the next request to that backend server with least load.
>  
> Is there any apache module, that can do this ?
> (We use linux and apache 2.4)
>  
> Heartbeat is not usable, because our backends do not run apache, but 
> something else.
>  
> Uli


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing with load detection on backend servers ?

2014-11-20 Thread Daniel Ruggeri
The guts are all there for this to work on the proxy side. We just need to make 
a module out of it. The question of header name and what-not can be solved by 
making it configurable. The real $1,000,000 question is what your backend is 
and how you can gather load information. This would be trivial to do with a  
Servlet filter in a J2EE app, but I am not sure about other implementations (my 
own ignorance rather than it being technically impossible).
-- 
Daniel Ruggeri


 Original Message 
From: Jim Jagielski 
Sent: November 20, 2014 7:36:11 AM CST
To: users@httpd.apache.org
Subject: Re: [users@httpd] Load balancing with load detection on backend 
servers ?

The only real question is how the load value of the backend
systems can be known and then "told" to Apache. I had proposed
awhile ago using some sort of custom HTTP X-header to send that
info.

> On Nov 19, 2014, at 3:28 AM, ulrich.her...@t-systems.com wrote:
> 
> Hi all,
>  
> I know the load_balancing-policies bybusyness, byrequests, bytraffic and 
> heartbeat.
>  
> We have a frontend apache, that acts as forwarding proxy to 8 backend servers.
> BUT: We want do route the next request to that backend server with least load.
>  
> Is there any apache module, that can do this ?
> (We use linux and apache 2.4)
>  
> Heartbeat is not usable, because our backends do not run apache, but 
> something else.
>  
> Uli


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load balancing proxy pass and reverse proxy pass

2011-03-14 Thread Tom Evans
On Mon, Mar 14, 2011 at 2:59 PM, aparna aryan  wrote:
> Hello,
>
> Our application is running with a apache webserver and 2 instances of
> weblogic server.
>
> localhost1- weblogic
> localhost2 - weblogic
>
> Now we are trying to replace localhost2 with tomcat and do clustering.
>
> The following configuration was with out clustering :
>
> We have the following configuration :
>
> Load balancing for localhost1 was done here.
>
>  
>  BalancerMember ajp://localhost1:port/xxx route=server_1
> loadfactor=33 retry=60
>  BalancerMember ajp://localhost1:port/xxx route=server_2
> loadfactor=33 retry=60
>  BalancerMember ajp://localhost1:port/xxx route=server_3
> loadfactor=33 retry=60
>  BalancerMember ajp://localhost1:port/xxx route=server_4
> loadfactor=33 retry=60
>  BalancerMember ajp://localhost1:port/xxx route=server_5
> loadfactor=33 retry=60
>
>  #load balancing performed based on number of user requests
>  ProxySet lbmethod=byrequests
>  # Report server is for Report purpose only so balancing is required
> now.
>       
>
> requests to localhost2 are forwarded only when user requests for certain
> functionality after logging in to localhost1. i.e..when a user hits the dns,
> the request is forwarded to one of the localhost1s that are clustered and
> from there when the user is trying to access certain pages, The request will
> be redirected to localhost2s via proxy pass settings that are set as
> following :
>
>  ProxyPass /xxx/xxx//viewGenericReport.jsp
> http://localhost2:xxx/eMatrix/jsp/mars/general/genericReport/viewGenericReport.
> jsp
>     ProxyPassReverse
> /eMatrix/jsp/mars/general/genericReport/viewGenericReport.jsp
> http://localhost2:xxx/viewGenericReport.jsp
>     ProxyPass
> /eMatrix/jsp/mars/general/genericReport/viewGenericReportnogzip.jsp
> http://localhost2:xxx/eMatrix/jsp/viewGenericReportnogzip.jsp
>     ProxyPassReverse
> /eMatrix/jsp/mars/general/genericReport/viewGenericReportnogzip.jsp
> http://localhost2:xxx/viewGenericReportnogzip.jsp
>     ProxyPass //hybridReport/ http://localhost2:xxx//hybridReport
>     ProxyPassReverse /hybridReport/ http://localhost2:xxx/hybridReport/
>     ProxyPass /CRReport.jsp http://localhost2:xxx/CRReport.jsp
>     ProxyPassReverse /CRReport.jsp http://localhost2:xxx//CRReport.jsp
>     ProxyPass /crProcessForwardReport.jsp
> http://localhost2:xxx/crProcessForwardReport.jsp
>     ProxyPassReverse /crProcessForwardReport.jsp
> http://localhost2:xxx/crProcessForwardReport.jsp
>     ProxyPass /iaProcessForwardReport.jsp
> http://localhost2:xxx/iaProcessForwardReport.jsp
>     ProxyPassReverse /iaProcessForwardReport.jsp
> http://localhost2:xxx//iaProcessForwardReport.jsp
>
>
> Please let us know how to load balance localhost2s
>
>

You do it exactly the same as you did for localhost1 (awful names btw!).

1) Define a  cluster
2) Adjust your ProxyPass rules to refer to this cluster instead of a
named backend.

Eg:


...


ProxyPass /iaProcessForwardReport.jsp
balancer://backend2/iaProcessForwardReport.jsp

etc

Cheers

Tom

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing - 2 Active nodes & 1 Inactive until threshold

2015-09-04 Thread Wei-min Lee
Not sure if this is what you're looking for, but you can use the 'max'
parameter per member to set the limit of connections and on the last member
use the 'status=+H' parameter to put it into a hot standby mode.

On Fri, Sep 4, 2015 at 12:08 AM, Leon Vergottini 
wrote:

> Dear Community
>
> I currently have a setup similar to the one below for load balancing.
>
> ProxyPass / balancer://something/ stickysession=JSESSIONID
> 
>   BalancerMember ajp://xxx.xxx.xxx.xxx:11009 route=node1
>   BalancerMember ajp://xxx.xxx.xxx.xxx:12009 route=node2
>   BalancerMember ajp://xxx.xxx.xxx.xxx:13009 route=node3
> 
>
> With this setup, traffic is divided equally between the three nodes.
> However, I would like traffic to be handled only by the first two nodes and
> node3 only comes into play when a threshold has been reached.  For example
> lets say I reached a 100 connections then node 3 gets activated and the
> traffic is spread across the three nodes.
>
> I had a look at the loadfactor option and my understanding is that all
> nodes are active all the time within the cluster, unless I have miss
> something or misunderstood the option.
>
> How will I go about setting up the configuration I have in mind, if it is
> possible?
>
> Thank you in advance.
>
> Kind Regards
> Leon
>



-- 
*~Wei-min Lee~*


Re: [users@httpd] Load Balancing, no fail over when backend server is down?

2012-03-28 Thread Anam Ali Khan
I think Apache mod_proxy do not support health checking for backend servers.

-Anam




 From: Ryan Bowman 
To: users@httpd.apache.org 
Sent: Thursday, 29 March 2012, 2:04
Subject: [users@httpd] Load Balancing, no fail over when backend server is down?
 
Greetings

I have recently setup Apache load balancing to two backend JBoss
(5.1.0.GA) servers. Communication over AJP, with Sticky Sessions, (no
session replication on the Jboss servers). I'm having a problem with
both Apache 2.2.21 (SUSE 11.3) and 2.4.1 (CentOS 5-something, I
think).

I shut off one of the jboss nodes, the balancer-manager page shows
that node's status as Err, yet Apache is still forwarding requests to
that server, which results in a 503.

Now, I'm making some assumptions here, but they seem pretty reasonable
to me - if one of the nodes is in error status, I assume Apache would
not send requests to it, even with Sticky Sessions. If I leave my
cookies as is (with the jvmRoute to the node that is down), I get a
503 page, which is extremely not useful, and contrary to one of the
main reasons we put in the second JBoss server.

In order to get Apache to send requests to the server that is
available, I have to either delete/modify the browser cookie, or set
the node status to disabled. We have monitoring in place for the
balancer-manager page, to alert me if the status of a node changes so
I can set it to disabled if I need to, but it seems like Apache should
not be sending traffic, even sticky traffic, to down nodes.

But what I want is that if the node is down that all requests would go
to the up node, sticky sessions be damned. If the user's session is
broken/reset in the server switch, that is a small thing compared to
getting a 503 page, making them think the site is down.

Can someone please tell me what am I doing wrong?


  BalancerMember ajp://jbtest1:8009 route=tn1 retry=0 loadfactor=1
  BalancerMember ajp://jbtest2:8009 route=tn2 retry=0 loadfactor=1
  ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
scolonpathdelim=On nofailover=Off


ProxyPass /images !
ProxyPass /apache-info !
ProxyPass /apache-status !
ProxyPass /balancer-manager !

ProxyPassMatch 
^(/|/cl/.*|/s/.*|/c/.*|/d/.*|/m/.*|/v/.*|/t/.*|/p/.*|/b/.*|/tw/.*)$
balancer://jbcluster

ProxyPassMatch (\.do.*|\.jsp)$ balancer://jbcluster

ProxyPassMatch (.*/styles/.*\.css|/scripts/.*\.js|/pie/PIE.htc)$
balancer://jbcluster

thanks
ryan

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Re: [users@httpd] Load Balancing, no fail over when backend server is down?

2012-03-29 Thread Tom Evans
On Thu, Mar 29, 2012 at 5:14 PM, Ryan Bowman  wrote:
> That doesn't sound correct to me, the balancer-manager page has a
> status column, and shows that one is OK, the other is Err. (see the
> attached screen shot)
>
> Apache knows that the backend server is having problems, shouldn't
> Apache then know to send the requests to healthy nodes?
>

There are no healthy nodes for that route, and no redirect route
configured for that route.

Also, you have "nofailover=off", but say "what I want is that if the
node is down that all requests would go
to the up node, sticky sessions be damned". Surely you just want this option on?

"""
nofailover  - Off - If set to On the session will break if the worker
is in error state or disabled. Set this value to On if backend servers
do not support session replication.
"""

If you have session replication, then both backends should be on the same route.

Cheers

Tom

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing, no fail over when backend server is down?

2012-03-29 Thread Ryan Bowman
On Thu, Mar 29, 2012 at 10:31 AM, Tom Evans  wrote:
> On Thu, Mar 29, 2012 at 5:14 PM, Ryan Bowman  wrote:
>> That doesn't sound correct to me, the balancer-manager page has a
>> status column, and shows that one is OK, the other is Err. (see the
>> attached screen shot)
>>
>> Apache knows that the backend server is having problems, shouldn't
>> Apache then know to send the requests to healthy nodes?
>>
>
> There are no healthy nodes for that route,

You seem to be implying that a given route can have multiple nodes?
As in there can be two jboss servers with the same jvmRoute? Then how
does Apache distinguish the two servers for the purposes of sticky
sessions? That doesn't sound right to me.

> and no redirect route configured for that route.

Perhaps I am misunderstanding the purpose of the redirect rule. the doc says


This value is usually set dynamically to enable safe removal of the
node from the cluster. If set all requests without session id will be
redirected to the BalancerMember that has route parameter equal as
this value.


which implies to me that requests WITH session id and that route
specified will still be sent to that node, which then yields the exact
same behavior I'm getting now. Requests without the route in the
session id will go to node 1, but since node 2 is down, Apache is
already sending new requests to node 1. what I need is for requests
destined for route 2 to fail over to a different route, because route
2 is broken.


> Also, you have "nofailover=off", but say "what I want is that if the
> node is down that all requests would go
> to the up node, sticky sessions be damned". Surely you just want this option 
> on?
>
> """
> nofailover      - Off - If set to On the session will break if the worker
> is in error state or disabled. Set this value to On if backend servers
> do not support session replication.
> """

I get the same behavior no matter what if nofailover is set to On or Off.

>
> If you have session replication, then both backends should be on the same 
> route.

Clearly, that is the optimal solution, but we do not have the time to
work on that particular puzzle right now.

>
> Cheers
>
> Tom
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Load Balancing, no fail over when backend server is down?

2012-04-20 Thread enabors
Backend servers sending 503 status in the worker's header can be used in the
balancer to mark it as Err.

The config is like this w/ failonstatus=503


Header add Set-Cookie "BALANCEID=backend.%{BALANCER_WORKER_ROUTE}e; path=/;"
env=BALANCER_ROUTE_CHANGED


ProxyRequests Off
ProxyPreserveHost On

BalancerMember http://venus.saa.com/ route=venus
BalancerMember http://saturn.saa.com/ route=saturn

ProxyPass /balancer-manager !

ProxyPass /  balancer://mycluser/  stickysession=BALANCEID nofailover=Off 
failonstatus=503


ProxyPassReverse /  balancer://mycluser/


--
View this message in context: 
http://apache-http-server.18135.n6.nabble.com/users-httpd-Load-Balancing-no-fail-over-when-backend-server-is-down-tp4741407p4902482.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org