On Thu, Feb 12, 2004 at 02:42:31PM -0800, John Kim wrote:
> Hi,
>
> We're considering setting up a cluster of Linux webservers with some sort of
> a load balancer that can handle up to about 10 million hits per day (~116
> hits/sec). The web content would not be very interactive -- just a static
> map (~100 kb) of a natural disaster event. Could you please make some
> recommendations for a Linux webserver configuration and/or a load balancer?
> Number of servers, memory, cpu, disk(s), etc. I'm trying to get an idea of
> how much we'd have to spend on hardware, and hope to tap into the experience
> of people who are already successfully running a cluster of Linux
> webservers.
>
> I talked to a government agency doing something similar (with similar
> expected web traffic) and they said they run 2 Sun Sparcstations, each w/
> 4gig memory, coupled with a Cisco LocalDirector load balancer. Their website
> is far more interactive than what we envision, but I imagine we need
> something in the same ballpark.
Mmm, I think this must be about the 100th time I have answered this
question.
Firstly, if you only want to use LVS to load balance 100Mb/s Ethernet
then any machine puchaced in the last few years should easily be able to
do that. End of conversation :-)
If you want to go to 1Gb/s Ethernet then things get more
interesting. At that point here are the things to watch out for:
1. Make sure your machines have a nice fast PCI bus.
These days most machines seem to have 66Mhz/64bit or 100Mhz/64bit
slots so you are fine. Back when 33Mhz/32bit was standard
this was a bit more problematic.
2. Buy good NICs that have well maintaiend drivers.
3. Use UP not SMP. Unless you really need SMP on the machine
for some reason then then locking overhead is greater than
the gain of an extra CPU when using LVS. This is particularly
true when handling small connections, where the TCP handshake
becomes significant. (That was on 2.4, not sure about 2.6, though
I assume that it still holds)
4. CPU isn't really much of an issue. If you can purchace a CPU
these days that is too slow to run LVS, even up to 1Gb/s then
I would be very supprised. Certainly anything over a 1GHz PII should
be fine.
5. Memory. First understand that LVS has no internal limits
on the number of connections it can handle, so you are only
bound by your system resources. Here is the equation. For each
connection you have in LVS's connection table you need about
128bytes. Connections will stay in the table for 120 seconds after
a connection is colsed. So if your peak is, say 300 connections/s,
then you need about 300*120*128=4608000bytes=4Mbytes of memory for
the connection table, which I think you will agree isn't much.
If you are using persistance then an extra entry (template) will
be created per end-user (masked by the persistance netmask) and
these will stay around for the duration of the persistance timeout.
You can do the maths there. But the bottom line is that
unless you are expecting an extreemly high number of connections,
then you don't need much memory.
Obviously you will need memory for other things like the OS,
monitoring tools etc... But I think that 256Mb of RAM should
be more than enough.
--
Horms
|