Solved

Load Balance

Posted on 2004-03-30
4
1,459 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

816 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

9 Experts available now in Live!

Get 1:1 Help Now