?
Solved

Load Balance

Posted on 2004-03-30
4
Medium Priority
?
1,466 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 600 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 450 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 450 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 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