LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-28-2010, 02:31 AM   #1
ratish81
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Rep: Reputation: 0
Choosing a load balancer - any sessions, application changes?


Hello there,

We are currently running a site on LAMP and servicing almost a million customers on a daily basis. We have come to a point where we need to improve the website performance and are looking at load balancing as one of the main ingredients for that.

Software based Load balancers (LVS - Linux virtual servers) are one of the recommendations we are looking at and we are looking if our host could possibly install and configure it for us.

There are some points however I am looking at before the implementation itself.

* Will I have to make any changes in the applications if I implement load balancing.
* LVS (or any other Load balancers) do maintain sessions. But are those only web server sessions ie user login etc or actual browser sessions. Let me explain
- User logs in (username/password), load balancer connects to server 1 and for the entire time user is logged on; server 1 is only used. Once user logs off, balancer can connect the user to server 2 or 3 etc.
- User just browsing a website (without logging in), will he be connecting to same server for his entire browsing session or different servers.

Please do let me know about the same so that we can anticipate if we need to do any application changes related to sessions management

Thanks in advance
 
Old 07-28-2010, 02:53 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and welcome to LinuxQuestions,

I use Hearbeat in combination with ldirectord (I know Pacemaker is the new toy in town but haven't come around to testing or installing it). We don't even come close to a million customers on a daily basis but are more in the range of a couple of thousand users per day. I have our configuration set so that a session will timeout after 5 minutes of inactivity so that users always stay connected to the same server. That means that when one of our users logs in he/she stays connected to the same server for the duration of his session OR untill there was a period of 5 minutes of inactivity.

We also use a 'LAMP' application as you call it, connected to a NAS for document storage and MySQL databases and I didn't have to do any change in configuration of the application, only on host level for what concerns the Heartbeat and load balancer configuration and the virtual IP configurations.

You can read more about Heartbeat and Pacemaker (the site also has links to other interesting software) on this site:
Linux HA

Kind regard,

Eric
 
Old 07-28-2010, 04:53 AM   #3
ratish81
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Hello

Thanks for the quick reply.

I will definitely look into heartbeat and ldirectord. The configuration changes you mention that will keep the session alive for 5 minutes - is that a configuration on the apache web server, application code or the load balancer configuration itself?

Also, what do you recommend for traffic redirection/reply back to user - Network Address Translation (through load balancer) or Direct Service routing (straight to clients)?
 
Old 07-28-2010, 05:09 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

The configuration I was referring to is set in the load balancer configuration file ldirectord.cf:
Code:
virtual=172.25.2.71:80
real=172.25.2.74:80 gate
real=172.25.2.75:80 gate
service=http
request="ldirector.html"
receive="Test Page"
persistent=300
scheduler=rr
protocol=tcp
checktype=negotiate
This is set for each node/gate. Since I only have experience with on this environment with NAT I cannot comment on the direct service routing. Hopefully someone else can shed some light on that one.

Also, ldirectord is no longer supported, you'd better look into Pacemaker instead. I'm sure there is a similar configuration option in Pacemaker too. I plan on upgrading after my vacation.

Kind regards,

Eric
 
  


Reply



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 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
Load Balancer shane200_ Mandriva 1 05-12-2005 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:13 PM.

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