LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2013, 03:40 PM   #1
arunvk
Member
 
Registered: Nov 2005
Location: India
Distribution: Fedora 29
Posts: 197

Rep: Reputation: 30
mod_proxy with F5 load balancer


Hi,

I have a setup where Apache connects to a F5 load balancer which in turn balances between two jboss app servers.

Apache using mod_proxy -> F5 (hardware load balancer) -> 2 jboss application server

It uses jsessionid. I sometimes get 500 errors for the post methods. I think the request goes to the incorrect jboss server because of the F5 load balancer. Everything works just right when I shutdown one of the jboss app servers.

Is there anything I can do to get around this issue. Thanks. Below is the configuration of mod_proxy

Code:
<VirtualHost x.x.x.x:80>
ServerName xxx.xxx.xxx.com
ErrorLog logs/error_log
CustomLog logs/log common
RewriteEngine on
RewriteRule ^/$ /manageCampaign/manageCampaign.faces [R]
<IfModule mod_proxy.c>
ProxyRequests On
ProxyPass /App http://loadbalanceURL/App/
ProxyPassReverse /App http://loadbalanceURL/App/
</IfModule>
</VirtualHost>
 
Old 05-30-2013, 05:13 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Not sure why you're posting this as an Apache issue, as this is very obviously about LTM. sounds like you need to set up session persistence on LTM. Recommendations are to use the F5 session persistence cookies to add in their own header for the pool member, but you can use the jsessionid cookie if you really want using a universal persistence profile

http://support.f5.com/kb/en-us/solut...0/sol7392.html

Also note that as mod_proxy pools connections, you'd need to use a oneconnect profile to balance on EVERY http request, not just the first in a given TCP stream. https://devcentral.f5.com/login?retu...neconnect.ashx

Why do you have LTM *between* Apache and Tomcat though? Why don't you have LTM infront of both an use an httpclass to through /App to tomcat and the rest at Apache?

Last edited by acid_kewpie; 05-30-2013 at 05:15 PM.
 
Old 06-04-2013, 01:09 PM   #3
arunvk
Member
 
Registered: Nov 2005
Location: India
Distribution: Fedora 29
Posts: 197

Original Poster
Rep: Reputation: 30
Thanks Chris for the reply.

Regarding the LTM question, the application team wanted it that way. We have LTM both in front of Apache and inbetween Apache and Tomcat. Sounds stupid but the application team wants it that way.

Regards,
Arun V.K.
 
Old 06-04-2013, 01:50 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Ha, well yes it IS stupid. But I'm in charge of a farm of 30+ Bigip boxes which do exactly the same thing, so I can't complain too much!
 
  


Reply

Tags
apache



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
load balancer nooralain Linux - Server 16 05-11-2012 04:47 AM
Load balancer izghitu Linux - Software 1 04-14-2010 10:02 AM
Load balancer mahmoud Linux - Server 9 04-24-2008 07:01 AM
load balancer ? spx2 Linux - Networking 4 05-29-2007 02:00 AM
Load Balancer shane200_ Linux - Networking 1 09-16-2005 02:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration