Solved

Load Balance

Posted on 2004-03-30
4
1,464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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