Load balancing made simple?

G

GeekBoy

Okay, I have two identical web servers running Windows 2003 web
server. I have an ASP.NET application which runs great on one of
them. Dedicated IP address, behind our firewall, etc. Everyone's
happy.
Now -- how do I take advantage of that second computer to
"load-balance" the web site? Will it really give my users a noticable
performance increase? How do you accomplish this? I've read many of
those MS articles and it's complicated... telling me to use load
balancing hardware and what-not. What's the easiest and quickest way
to get a nice performance (and reliability) boost with multiple web
server? Or, is this more complicated than just a few minutes of
configuration setup? :)
 
J

John Timney \(Microsoft MVP\)

When you say identical servers, you are talking about clustering and its not
an easy activity for the inexperienced, especailly if your making use of
asp.net sessions locally, rather than via a DB on another server for
example.

Unfortunately, I dont think anyone can easily tell you how implement
clustering, your going to have to do a lot of reading about and
experimenting.
I would start with the materials vailable at the Microsoft Academic
Alliance:
http://www.msdnaa.net/curriculum/?5925

......and read this

http://www.microsoft.com/windowsserver2003/technologies/clustering/default.m
spx

You could however think about performance increases another way. You have
two servers, both capable of making use of ASP.NET and IIS6's caching
features - which are very good. You could split your server based on asp.net
applications, gauging use and balancing on a best guess and testing basis on
whether an individual server can cope with your expected max load, and where
you need to split off to another box. You could for example render all of
your images and files from one server, and all of your asp.net from
another - all good ways of increasing the performance, I'm sure you can
think of other ways if you take the time to go over your solution.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
G

GeekBoy

I already have the StateServer on another computer and that's running
fine.
I guess I am talking about clustering -- the ability to "sniff out"
which server is best suited to handle the current request, based upon
cpu, memory, load, whatever you want to call it. Is this generally
handled by routing equipment setup in the firmware, or is it all
software server setup?
With regard to your other comment about speed increases, I understand
what you're saying... if I have, say, two important sections of the
website, I could push one section to another server and host the
application there, seemingly pushing half the company to another
computer, dedicated to that one task. I agree it could increase
performance, but I'm not so sure I understand how, say, moving all
images or web pages themselves to another server could increase
performance? These things are tiny in comparison with the code-behind
DLL and the ASPX pages it needs to load, not to mention the SQL
commands, which are probably the bulk of the time it takes to render a
page.
 
J

John Timney \(Microsoft MVP\)

Most of your answers will come from testing your scenarios of use, to
identify likely patterns of failure or peak use. If you have two servers
doing the same task, you could use simple round robin DNS to choose a server
at random, or configure your routers to choose a server based on client IP.
They are mostly network issues for a implementing a cluster. As I said,
unfortunately most of this is simply a long reading and learning exercise.

The comment on moving images and hard files (word docs etc) to another
server means your asp.net severs dont have to process request for these.
Your asp.net pages are delivered faster and the browser thenrequest the
fixed things like images from another server at the client side in a typical
request fashion - thus you remove CPU cycles from the asp.net servers whos
primary goal is to process code behind, DLL's and aspx files. This is a
technique used by very large volume sites like the BBC.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
G

GeekBoy

Interesting ideas you suggest, John. Let me see if I understand
something here, since I'm not a network guy myself, although I do have
a few at my disposal:
1. Are you saying that my network guys can configure our Cisco routers
to "choose" or "alternate" between identical IIS 2003 web servers and
thereby simply put less users on each computer? This can all be done
in router configuration? I would simply keep all my servers
identical, with the exact same aspx/dll/etc. pages in the same
directories, cloned copies basically, and all of this can be handled
by the hardware?
2. Are you suggesting that another idea would be to take all my
images\ directories and place them on another server within the
segment? I already house all the large static documents (word, tiff,
pdf, etc) on other servers, however I don't see how that saves CPU
cycles since the aspx web application simply says to open that drive
and fetch it and give it to the web user. How could taking, say, all
the JPG files and placing them on another server help? Instead of
asp:image source=~/images/foo.jpg it would simply be
source=\\server2\images\foo.jpg. This could help?? I don't see how??
"fetching" the small jpg is hardly the lengthy part of this request,
in my mind. Or, are you saying to do something like asp:image
source=https://www.someotherdomain.com/images/foo.jpg? Now that I
could see as a benefit indeed... an interesting suggestion, but again
I would have to imagine thousands of users before doing something like
this could be noticable.
I will speak to my network guys and test something out on our
development segment. Thanks much for your suggestions!
 
C

Chris Palmer

I know this won't be the most popular response on a MS newsgroup, but we
are using a reverse proxy in Apache and experimenting with the Linux-HA
project to do load balancing to servers inside our local network. The
reverse proxy Linux/Apache box sits in our DMZ.
 
G

GeekBoy

One more question --
Do you mean to say that each REQUEST will alternate between web
servers, or each SESSION would alternate between servers? If I use
the website and post stuff on one page, then post stuff on another
page, am I hitting the same web server or is the router switching me
between the two, or which ever is next in the round-robin approach?
 
J

John Timney \(Microsoft MVP\)

It depends on your routers, some do whats called sticky routing and send you
to the same server, others randonly choose one.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
J

John Timney \(Microsoft MVP\)

1. possibly - ask their advice

2. All images are served after the page is delivered to the client, as a
request by the browser back to the web server. All your asp app is doing is
passing the path to the browser to resolve as a part of the page output. It
can get those images from any server.
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
G

GeekBoy

One of my network guys just told me that this can't be done internally
here because none of the employee computers go though our routers,
only external users. I thought Cisco Local Director handles stuff
like this, but I might be wrong. Otherwise, isn't there a Microsoft
Cluster Service available, which is supposed to be true network load
balancing?
 
J

John Timney \(Microsoft MVP\)

Yes, Win23K has a clustering/load balancing service you could look at
utilising.

You could always ask them to configure and loan you a router to test your
configuration, and if you get the results you expect it will give you the
justification to raise the business case for one.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top