Skip to content

24. Web Gardening, Application Objects, Threads

March 5, 2011

70. What is Web Gardening? How would using it affect design?
Web Gardens are different from Web farms. A Web garden is configured on a single server by specifying multiple worker processes for an application pool. Web farms use multiple servers for a web site. Web Gardening can enhance performance in the following situations: Robust processing of requests. When a worker process in an application pool is tied up (for example, when a script engine stops responding), other worker processes can accept and process requests for the application pool. There is also a reduced contention for resources. When a Web garden reaches a steady state, each new TCP/IP connection is assigned, according to a round robin scheme, to a worker process in the Web garden. This helps smooth out workloads and reduce contention for resources that are bound to a worker process.
Web gardening helps enable scalability on multiprocessor computers by distributing the work to several processes. This improves performance and eliminates cross processor lock contentions.

71. Given one ASP.NET application, how many application objects does it have on a single proc box? A dual? A dual with Web Gardening? How would this affect design?
This one is ambiguous. Come back to this one later.

72. Are threads reused in ASP.NET between requests? Does every HTTPRequest get its own thread? Should you use Thread Local Storage with ASP.NET?
Threads are reused in ASP.NET between requests. Each HTTPRequest gets serviced by an HTTPApplication object, that is pooled. Thread Local Storage provides a mechanism to store data that is unique to a thread and whose value is determined at run time. TLS should not be used with ASP.NET since inside the ISAPI DLL, which thread will be called is not predictable, so TLS should only be used to track resources that are explicitly bound to a thread.

Happy Programming!

Source: mainly MSDN.

From → OOP

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: