Solved

Load Balance

Posted on 2004-03-30
4
1,453 Views
Last Modified: 2013-12-06
Hello,

I have a Linux server running red hat enterprise.
We use PHP/Mysql and need to load balance.

when we promote specials we get so much traffic that the server shuts down.

What do i need to do to setup load balancing?
Do i need to recode anything?

0
Comment
Question by:bionicblakey
4 Comments
 
LVL 9

Expert Comment

by:Alf666
ID: 10718831
You could load balance with a simple DNS round robin. That is, have multiple A entries with the same IP address.
It's not the best though if you want to, for example, shutdown one of the systems.
Plus, it can be a nightmare if you handle sessions locally on the PHP side (versus in the MySQL DB), because if clients ask one page to one server
and the next one to another, it will mess up your sessions.

You can use a switch capable of layer 2 switching. They are clever enough to keep a notion of session in between requests.

There are also a few Linux based software load balancers (free and commercials). Among the free ones :

http://www.linuxvirtualserver.org/
http://plb.sunsite.dk/download.html

You won't be able to load balance the DB though. If it's the one giving you troubles, you'll have to rethink your database schema/model and/or cache certain information. You could also decide to split up your database to multiple boxes if your schema allows it.


0
 
LVL 12

Accepted Solution

by:
paullamhkg earned 200 total points
ID: 10720131
For MySql there is high availabilty and load balancing method have a check here http://www.mysql.com/newsletter/2003-04/a0000000157.html

To recode your PHP might help, also check whether there is/are any un use service running in your linux box, if there any un use service, try to stop it, will also help.

and Add RAM and swap space will also help :)
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 150 total points
ID: 10726576
PHP can handlesessions in Mysql, this is much better than the cumbersome/insecure  PHP method in files, see php.ini
0
 

Assisted Solution

by:Peeyush_Maurya
Peeyush_Maurya earned 150 total points
ID: 10727443
if u want to do load-balancing, look at

http://geocities.com/peeyush_maurya/bonding.htm

hope it helps

Regards,
Peeyush
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now