Frage

We're building a web application using Asp.net MVC with Sql Server database. This application is supposed to serve hundreds of users or even thousands. In order for it to be scalable, We want to separate the database to a different server from where the IIS is running.

What's the best way to do this? a reference from the IIS server to the database server using a connection string? won't it slow down performance?

We also want to separate some of the services of this application to a different (third) server. Does replicating the database to this third services server a good idea? this way we'll reduce the load on the database machine from our first question. How is it done?

War es hilfreich?

Lösung

What's the best way to do this? a reference from the IIS server to the database server using a connection string? won't it slow down performance?

There is no best way because there is only one way to start with. Put the SQL Server on another machine. Finished.

You will have to adjust the connection string. This will introduce latency and the bandwidth is lower than in memory, but practically those things are irrelevant - unless you make a select * From table and filter in memory, which hopefully no one does.

Point is - you get more processing power, you get scalability, and the small theoretical impact is neglegible in comparison. If you manage to load up even a 1gigabit network link with data you have either some seriously bad design or some really awkward programming. The higher speed of a non trivial and hopefully build for the purpose database server will far more than outweigh eny small loss of performance.

Does replicating the database to this third services server a good idea?

How long is a piece of string? It depends - on the services. In general - no. In very few edge cases - yes. How to decide? Experience - and common sense, based on the specific requirements.

Andere Tipps

It advised to only have SQL Server by it self on a server. and DO NOT run any other applications on the that server/Machine. (even Avoid having Multiple Instances on one machine if possible). As SQL Server by its very nature makes use of all the possible avilable resources to give the best performance and it assumes that it is the only application on that machine.

So hosting Sql Server and IIS on same machine you will start and fight between the two applications for resources.

And obviously if you have sql server on a separate server you will need to tweak your connection string.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top