Apache Load Balancing

npsken

Member
Nov 24, 2007
38
0
61
I am currently researching apache load balancing and I was wondering if anybody could tell me an extremely general idea about when it is necessary to load balance in terms of hits, memory usage, and cpu usage.

If anybody was able to decipher what I'm asking and knows an answer that could help, please reply!

Thanks,
- Ken
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
First you need to figure out if you even need to do any load balancing.

Are you having performance issues with your site that clients are complaining about? First I would examine your current apache setup and make sure it is optimized for your site and hardware.

What is your hosting setup like? Running a full LAMP stack on one server? Shared hosting?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
You don't normally load balance based on cpu/memory usage because that isn't a good indication of response time. It can be done, but it's not a good way to go about it. You will need a load balancer such as F5's Big-IP or Cisco's ACE. The load balancer can distribute the load to as many real servers as you like based on a whole slew of criteria like response time, least connections, round robin, least loaded, least bandwidth.

http://www.f5.com/products/big-ip/
 

npsken

Member
Nov 24, 2007
38
0
61
Starting out I was going to run a LAMP stack on the RackspaceCloud (CloudServers). I was just curious for the worst case scenario when upscaling doesn't work anymore and I have to use more servers.

Thanks!
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Depending on your site moving the database off your web server and using a caching store like memcached on the web server might have a much bigger impact on your performance(especially if it's read heavy).

If you are getting a managed service Rackspace should be able to help you come up with a design for your servers. You really won't be able to do anything until you can get accurate performance metrics of your site though.
 

npsken

Member
Nov 24, 2007
38
0
61
Moving the database to a separate server was another alternative I was looking at. Do you think that would really make a big difference (along with memcached)?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Moving the database to a separate server was another alternative I was looking at. Do you think that would really make a big difference (along with memcached)?

Like I've said in every post, it depends on YOUR site and what it is doing.

There is no way anybody can make any sort of solid recommendations without first knowing what your site is doing and having current performance metrics.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Like I've said in every post, it depends on YOUR site and what it is doing.

There is no way anybody can make any sort of solid recommendations without first knowing what your site is doing and having current performance metrics.

Exactly. Hell, some sites can get away with just using DNS round-robining for simple load balancing.
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
reverse proxy server like squid could handle static and pass through dynamic content if you want. maybe they've even added ssl acceleration so the ssl is handled by the proxy and your core web server just sees everything as non-ssl.