Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Architecture recommendation for load-balanced ASP.NET site

UPDATE 2009-05-21

I've been testing the #2 method of using a single network share. It is resulting in some issues with Windows Server 2003 under load:

http://support.microsoft.com/kb/810886

end update

I've received a proposal for an ASP.NET website that works as follows:

Hardware load-balancer -> 4 IIS6 web servers -> SQL Server DB with failover cluster

Here's the problem...

We are choosing where to store the web files (aspx, html, css, images). Two options have been proposed:

1) Create identical copies of the web files on each of the 4 IIS servers.

2) Put a single copy of the web files on a network share accessible by the 4 web servers. The webroots on the 4 IIS servers will be mapped to the single network share.

Which is the better solution? Option 2 obviously is simpler for deployments since it requires copying files to only a single location. However, I wonder if there will be scalability issues since four web servers are all accessing a single set of files. Will IIS cache these files locally? Would it hit the network share on every client request? Also, will access to a network share always be slower than getting a file on a local hard drive? Does the load on the network share become substantially worse if more IIS servers are added?

To give perspective, this is for a web site that currently receives ~20 million hits per month. At recent peak, it was receiving about 200 hits per second.

Please let me know if you have particular experience with such a setup. Thanks for the input.

UPDATE 2009-03-05

To clarify my situation - the "deployments" in this system are far more frequent than a typical web application. The web site is the front end for a back office CMS. Each time content is published in the CMS, new pages (aspx, html, etc) are automatically pushed to the live site. The deployments are basically "on demand". Theoretically, this push could happen several times within a minute or more. So I'm not sure it would be practical to deploy one web server at time. Thoughts?

like image 919
frankadelic Avatar asked Mar 05 '09 04:03

frankadelic


People also ask

Which architecture is best for .NET core?

ASP.NET Core's built-in use of and support for dependency injection makes this architecture the most appropriate way to structure non-trivial monolithic applications. For monolithic applications, the Application Core, Infrastructure, and UI projects are all run as a single application.

Can we deploy microservices in iis?

IIS is good enough for you case. You can configure the IIS to run your service soon as you deploy it, and it will continue to listen to your RabbitMQ. Although if you have a service that communicates with other Services using only RabbitMQ I would rather build it as WindowsService.

What is .NET core architecture?

ASP.NET Core is a revised version of ASP.NET that includes architectural improvements to create a modular framework. With ASP.NET Core, you can do the following: Build web apps and services, IoT Apps, and mobile backends. Use development tools on Windows, macOS, and Linux.


2 Answers

I'd share the load between the 4 servers. It's not that many.

You don't want that single point of contention either when deploying nor that single point of failure in production.

When deploying, you can do them 1 at a time. Your deployment tools should automate this by notifying the load balancer that the server shouldn't be used, deploying the code, any pre-compilation work needed, and finally notifying the load balancer that the server is ready.

We used this strategy in a 200+ web server farm and it worked nicely for deploying without service interruption.

like image 89
Mufaka Avatar answered Oct 14 '22 10:10

Mufaka


If your main concern is performance, which I assume it is since you're spending all this money on hardware, then it doesn't really make sense to share a network filesystem just for convenience sake. Even if the network drives are extremely high performing, they won't perform as well as native drives.

Deploying your web assets are automated anyway (right?) so doing it in multiples isn't really much of an inconvenience.

If it is more complicated than you're letting on, then maybe something like DeltaCopy would be useful to keep those disks in sync.

like image 32
JeremyWeir Avatar answered Oct 14 '22 11:10

JeremyWeir