LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: SV: Introduction and LVS/DR 2.4 realserver questions

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: SV: Introduction and LVS/DR 2.4 realserver questions
From: msteele@xxxxxxxxxxxxxxxxxxx
Date: Thu, 01 Mar 2001 01:18:35 -0500
You might want to have a look at the kernel
httpd accelerator (khttpd). It should be blazing fast
for serving static content as it intercepts
requests on port 80 for filetypes you define,
and serves them. It only passes the connection
to the webserver when it can't figure out what
to do with a request. The only drawback is that
it doesn't yet do virtual hosts. So let's
say that you configure host.foo.com to have
a dedicated ip, and setup all your pages to do
requests to that ip, then setup ktthpd on all
your real machines, combine that with LVS and
you might see a significant increase in speed.

Another thing you might want to consider is
dropping mysql. I've read that postgresql is
much faster and handles concurrency much
better than mysql. I'm currently starting
to have problems with mysql and I'm going
to switch to postgres shortly. Postgresql
will shortly have database replication support,
which means that you'll be able to distribute
requests to different database servers
throughout your network. 




info about ktthpd (from the kernel readme):

1. Introduction
---------------
   kHTTPd is a http-daemon (webserver) for Linux. kHTTPd is different
from
   other webservers in that it runs from within the Linux-kernel as a
module
   (device-driver).
 
   kHTTPd handles only static (file based) web-pages, and passes all
requests
   for non-static information to a regular userspace-webserver such as
Apache or
   Zeus. The userspace-daemon doesn't have to be altered in any way.
 
   Static web-pages are not a very complex thing to serve, but these are
very
   important nevertheless, since virtually all images are static, and a
large
   portion of the html-pages are static also. A "regular" webserver has
little
   added value for static pages, it is simply a "copy file to
network"-operation.
   This can be done very efficiently from within the Linux-kernel, for
example
   the nfs (network file system) daemon performs a similar task and also
runs
   in the kernel.
 
   By "accelerating" the simple case within the kernel, userspace
daemons can
   do what they are very good at: Generating user-specific, dynamic
content.
 
   Note: This document sometimes uses "Apache" instead of "any webserver
you
   ever might want to use", just for reasons of readability.
 
 
2. Quick Start
--------------
 
   1) compile and load the module
   2) configure the module in /proc/sys/net/khttpd if needed
   3) echo 1 > /proc/sys/net/khttpd/start
 
   unloading:
 
   echo 1 > /proc/sys/net/khttpd/stop
   echo 1 > /proc/sys/net/khttpd/unload
   rmmod khttpd
                                    


More can be found in /usr/src/linux/net/khttpd/README


Regards,

-- 
Mark Steele
Vice president research and development
Inet Technologies Inc.
msteele@xxxxxxxxxxxxxxxxxxx

010110010110111101110101001000000110000101110010011001010010000001100100011101010110110101100010

Johan Isacsson wrote:
> 
> Hello Rajiv,
> 
> We have actually considered both options for quite some time and for now
> httpd+mysql on same host seems to be the best configuration. I'll explain
> why:
> Each mahine can take up to about 200 http connections with 1 Gb RAM (all
> realservers have 1 Gb RAM). Since we use PHP the http processes are at least
> 5 Mb in size, so we have big memory problems if we go any further than that.
> 
> At that load the local MySQLd runs fine having about 200 connections.
> 
> In a dedicated database setup we have big problems running over 500
> connections to MySQL. So instead of having, for example, 2 webservers
> sharing 1 database machine and still just get to handle 400 connections we
> choose to have 2 web+db machines that can also take 400 connections.
> That saves us the cost of 1 db mahine per 2 web servers. In total we save 8
> machines, and that's http 1600 connections :)
> If anyone have comments on this i'd love to hear them.
> 
> One thing we've been thinking about is to serve static images from separate
> webservers running boa or some other small and efficent webserver. The
> problem with it is that it would make life complicated for the designers and
> webmasters unless there was a way of doing it behind the scenes.
> One scenario could be that the load balancer would look at the requests and
> direct all /images/* to the static virtual server. I know that some
> loadbalancers can do that, how about LVS?
> 
> Well, thanks for your comments :)
> 
> Regards,
> Johan Isacsson
> MGON
> 
> > -----Ursprungligt meddelande-----
> > Från: lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx]För Rajiv Khaneja
> > Skickat: den 26 februari 2001 09:05
> > Till: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> > Ämne: RE: Introduction and LVS/DR 2.4 realserver questions
> >
> >
> > Hello,
> >
> > Greetings, I am new to this list as well and would like to offer some
> > friendly advice.  Get your MySQL databases on to some dedicated servers.
> > Why run a RDBMS + Webserver on the same machine? You should see some big
> > improvements...
> >
> > Regards,
> > Rajiv Khaneja
> >
> > -----Original Message-----
> > From: lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Johan
> > Isacsson
> > Sent: February 25, 2001 10:47 PM
> > To: Lvs-Users
> > Subject: Introduction and LVS/DR 2.4 realserver questions
> >
> >
> > Hello,
> >
> > I'm new to this list so here comes a little introduction.
> > My name is Johan Isacsson and i'm the CTO of MGON International
> > AB, based in
> > Sweden.
> > MGON creates and maintains websites about computer games, traffic is about
> > 25 million impressions/month.
> > Almost all pages are dynamic, so we need to distribute the load
> > over several
> > servers. We're running Linux 2.2 with Apache+PHP and MySQL on all
> > realservers, about 16 in total.
> > We use custom/scp script for file mirroring but are looking for
> > better ways
> > of doing that (any suggestions are welcome).
> > Currently we use LVS/DR to distribute the load and it works very well for
> > us.
> > Before that we used IBM Network Dispatcher which i think worked
> > the same way
> > as LVS/DR do, but it costs lots of money! :P
> > Well, enough about me, on to the questions!
> >
> > 1. Is the redirect approach working (well) on 2.4, and if so, are
> > there any
> > drawbacks using that method compared to the hidden arp method in 2.2?
> > 2. Is it a very bad idea to just have 1 NIC on the LVS machine to receive
> > and forward the requests?
> >
> > It's a DR setup.
> >
> > We have another server location with a 4Mbit connection that we don't use
> > much. We have some servers there serving static files, but i'd
> > like to load
> > balance them between that location and our main location. Like this:
> >
> > Location 1 (Max 4Mbit)
> > Static file servers
> > FS1
> > FS2
> >
> > Location 2
> > Static file servers
> > FS3
> > FS4
> > Virtual server
> > VFS1 (FS1,FS2,FS3,FS4 LVS/TUN)
> >
> > I'd like to use as much as possible of the bandwidth in location 1 (up to
> > 4Mbit) and after that start using the fileservers at location 2. The
> > bandwith usage can be taken from the router at location 1 using snmp.
> > If anyone have suggestions about how to set up scheduling for
> > this i'd love
> > to hear them :)
> >
> > Thanks for your time,
> >
> > Johan Isacsson
> > MGON
> >
> >
> > _______________________________________________
> > LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> > Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> > or go to http://www.in-addr.de/mailman/listinfo/lvs-users
> >
> >
> > _______________________________________________
> > LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> > Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> > or go to http://www.in-addr.de/mailman/listinfo/lvs-users
> >
> 
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users


<Prev in Thread] Current Thread [Next in Thread>