G
Guest
I am trying to write a basic load balancer (in our web service) solution. The
purpose of this load balancer is to keep an array updated with server status.
We have several servers that can be accessed in order to retrieve information.
From within the “Application_Start†(Global.asax), I create as many threads
as servers we have available. The idea is that each thread will query each
server and update a flag in the public array. When a “true†request comes in,
the system checks for two things:
* Server availability (on-line vs. off-line)
* Server load (based on a value returned by the server every time a thread
sends a new query)
I noticed that the threads may stop working. Sometimes they run for a long
time and sometimes they run for a short period of time. I started reading
some posts related to threading and I found this one “Threading in asp.net
issue - Thread stops†created on 11/12/2004 where “John Saunders†(who is
responding) says that the use of threads in a ASP.NET application is a bad
idea. He said “don't use threads with ASP.NET.â€
If this is true, how can I approach this load balancer project? Any ideas
will be greatly appreciated.
Thanks in advance.
purpose of this load balancer is to keep an array updated with server status.
We have several servers that can be accessed in order to retrieve information.
From within the “Application_Start†(Global.asax), I create as many threads
as servers we have available. The idea is that each thread will query each
server and update a flag in the public array. When a “true†request comes in,
the system checks for two things:
* Server availability (on-line vs. off-line)
* Server load (based on a value returned by the server every time a thread
sends a new query)
I noticed that the threads may stop working. Sometimes they run for a long
time and sometimes they run for a short period of time. I started reading
some posts related to threading and I found this one “Threading in asp.net
issue - Thread stops†created on 11/12/2004 where “John Saunders†(who is
responding) says that the use of threads in a ASP.NET application is a bad
idea. He said “don't use threads with ASP.NET.â€
If this is true, how can I approach this load balancer project? Any ideas
will be greatly appreciated.
Thanks in advance.