LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2006, 07:10 AM   #1
coolguy_iiit
Member
 
Registered: Aug 2004
Posts: 51

Rep: Reputation: 15
Linux Clusters Help


Hi,
We are maintaining a apache web server which has to handle 1000 simultaneous requests.but currently our server is able to handle only 100 simultaneous requests.we want to increase the scalability of server by clustering.I want the cluster to handle only apache requests and we are using php for web scipting.

1) Which software should be used to build such a cluster?
2) Because we will have sessions in php all the requests are to be forwarded to the same backend server for proper access.Is it possible to overcome this problem with the above cluster software?

With Regards,
CoolGuy
 
Old 08-05-2006, 01:07 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
1) There are a number of different options. Perhaps the easiest option is to purchase a hardware load balancer. If you don't have the money for that you could use round-robin DNS or some sort of reverse squid proxy. I've never actually tried these though. If you're running RHEL, CentOS, or Fedora you could also try out the Red hat cluster suite which I believe can do something like this.

2) A load balancer or proxy can probably be configured to track sessions and send them to the same server. One other idea is to store the session data on an NFS server accessible to all of the Web servers -- the session,save_path configuration directive in your PHP config can do this.

BTW have you tried playing with the Apache paramaters (spare servers, timeouts, etc.) to try to increase the load it can handle. Depending on your hardware you might be able to do more than 100 connections (particularly if you have a big SMP box). The bottleneck might also be with file access and if so you could look into faster disks and/or a RAID configuration.

Last edited by btmiller; 08-05-2006 at 01:09 AM.
 
Old 08-05-2006, 02:03 AM   #3
coolguy_iiit
Member
 
Registered: Aug 2004
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks for the reply.I checked http://lcic.org/load_balancing.html link and i found that Linux virtual server is the best option for load balancing.
I am thinking of using LVS for load balancing but
Its mentioned at http://www.linux-vs.org/docs/persistence.html that LVS will take care of https,cookies etc. will it also be able to take care of sessions?
I checked out the reverse proxy,round-robin DNS and redhat cluster suite but will they be able to handle sessions by default(i mean without using nfs etc..)?
Here is my uname -a output.

Linux localhost.localdomain 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686 athlon i386 GNU/Linux

Will this kernel has any problems with LVS?

General Questions : Many web servers in the internet use php and how are they able to balance load and able to handle 1000's of requests? which clustering option are they using?
 
Old 08-05-2006, 11:38 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
PHP stores sessions as files on the server with a session key handed back to the client (usually in the form of a cookie) handed back to the client. As long as the Web server can access the session state files, you're OK. LVS, round-robin DNS, etc. don't do anything AFAIK to make that happen -- you have to set it up yourself. If you use the Red Hat cluster suite you can use GFS to provide a global filesystem to put the shared data on, which is probably more robust than NFS. You could also use a database back-end. Many databases, including MySQL and Oracle, and be clustered for added performance/reliability. This might involve re-writing the app to be able to handle a db back-end, though.

Internet facing Web sites use a number of techniques. I imagine that big companies with $$$ mostly use special commercialized appliances from vendors such as Cisco that transparently balance HTTP traffic. As I mentioned above, I think this can be done with Squid but it probably isn't as fast as a commercial solution on specialized hardware.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Network Appliance Targets Linux Clusters LXer Syndicated Linux News 0 07-06-2006 10:21 PM
LXer: Why Linux on Clusters? LXer Syndicated Linux News 0 01-31-2006 09:16 PM
Linux Clusters the_crony Linux - Networking 2 01-10-2006 08:55 AM
load for linux clusters porous Linux - Networking 2 03-13-2004 03:07 AM
Linux Clusters for newbies tomgun6 Linux - General 1 02-21-2003 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration