Click to See Complete Forum and Search --> : How to handle busy servers?


comn8u
03-26-2007, 01:41 PM
I have a web application that can only handle 250 concurrent users at one time. I want to send users (that exceed the 250 users) to a page that will make them wait until the web application becomes available. How would I go about doing that?

PeOfEo
03-26-2007, 02:25 PM
You can track how many users are using an application using global variables, but load balancing and management should not be done on the webserver. The server can track how many active sessions it has, but when the server is busy it will not fire the events on session end to deallocate an old session right away (atleast not with asp.net). Also everytime someone wants to get on the server a new session will be opened and the server will have to do something in the way of redirecting them. Any kind of load balancing and management really needs to be handled up stream by the router / switch. What is your current setup? If possible you should look into a load balancing appliance (if you are in an IT environment, those things can be expencive) and some more servers to handle the load.

comn8u
03-26-2007, 02:44 PM
We have an F5 BigIp Load Balancer and two MS Server 2003. Do you know of any software that could handle the catch and redirect? I've never used it, but someone told me that ticketmaster has this process for when users rush to buy tickets online (for instance - first minute tickets come out). If you were to buy superbowl tickets, for instance, the request would send you to a page that would say "Please wait...". After a moment, the page redirects you to the ticket purchase page. I'm not sure if this is a simple (load page behind another page) or something else.

I could try to keep track using global variables, but this is a canned application. All code is compiled. The payment server is going to be the problem. The user license we have has a maximum of 250 users at one time. Anything above that will not work. From what I hear, if too many users go through this system concurrently, payment will not go through. The scary part, is that the user will think that they went through ok, but if that particular user(s) were over the limit, the transaction would not go through.

So, would I try to find software to handle this? I would need some way of monitoring the amount of concurrent users at a given time, and then have the ability to send them to a redirect page that would keep checking the # of concurrent users, and once the # of concurrent users went down, then they would be redirected to either the application front end or the final payment screen. How would you handle this based on what I told you?

Ribeyed
03-26-2007, 05:41 PM
Hi,
have a look into HTTP Handlers and Asynchronous calling.
You could create a HTTP Handler factory that implements the IHttpHandleFactory interface to serve the requests.
The HTTP handler factories are used to perform some perliminary tasks on the requested resource proir to passing it on to the handler.
You can create asynchronous handlers to handle the overflow of current users.

PeOfEo
03-27-2007, 12:21 AM
We also use F5 Big Ip balancers, but I am out of the office right now, otherwise I would have one of my co-workers take a peak at this thread. Durring registration (especially freshmen) there is a mad rush at 8:00am and we have 8 front end servers for that system and we need to keep them from getting swamped and the load well distributed. But that isn't exactly my area of expertise.

Ribeyed
04-03-2007, 02:54 PM
Hi,
don't know how you go on with this but i found this and thought it might help you.
http://www.codeproject.com/dotnet/dotnettcp.asp

PeOfEo
04-03-2007, 04:03 PM
That is very cool! However, probably infeasible for any kind of dynamic content (without the use of some open classes somewhere along the line?). But still, that's cool, I haven't seen much in the way of multi-threading with .net. Nice find!