Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > Linux Help

Linux Help Post any question relating to Linux here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-06-12, 08:07 PM
Junior Member
 
Join Date: May 2006
Posts: 5
czamora is on a distinguished road
Question Load balancing for a web site

Hi,
I have a growing website that needs to move from its current single-server setup to using a cluster of servers to deliver its dynamic pages.
My current host does not support load balancing among its servers, so I'm left to configure that on my own. Round-rovin DNS doesn't work for me as I'll need certain http requests to always go to the central server (the one with the master database).
My distro is Redhat 9, and I only access the server remotely through SSH. I'm using Apache 2 (and PHP and Mysql).
Any ideas on the simplest way to do this?
I've read a bit about LVS (http://www.linuxvirtualserver.org/) but it seems to require a kernel recompile, which is way beyond the things I would dare to try...
Thanks a lot.
__________________
My little den on the web
My pet projects: Trade Cards Online and Miniature Trading
Reply With Quote
  #2 (permalink)  
Old 2006-06-13, 01:34 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

VPS (Virtual Private Server) will do nothing for you, it doesnt help on resources, it just splits the server you have up and actually will make it run slower overall since you now have extra overhead.

Getting rid of Apache2 would help, it is still very slow compared to Apache 1 when running PHP.

If your site truly needs multiple servers, then you need to find a different host. It is best to load balance at the switch, and move the database to its own powerhouse.

If you don't want that, there is LTSP, but if you cant recompile, that isnt going to do you any good.

The bottom line is either upgrade your hardware on your one server, or change hosts to a hosting company that can do multiple. Rackspace is probably the best of all managed hosting companies. We have our webapplication running 3 apache servers in front of a huge oracle database server. Just as a warning, RS, is quite expensive, so make very sure you need multiple servers.

As a note, if we are not talking hundreds (or more) cocurrent users, you do not need multiple servers, just get a dual dual-core processor box with like 8GB of RAM and high speed SCSI drives and save your self the headache.

Also, moving your database off to another server that is bigger and more customized to run MySQL will dramatically increase performance, but it is best to have at least 100mpbs, perferbably 1000mpbs between them. This is a concert, since a lot of hosting companies, espeically unmanaged, only give 10mpbs without upgrading.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.0 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.0 (a popular PHP IDE) and NuCoder 1.4 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:09 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.