ASP.Net load balancing

I am working on asp.net (newbie) and I am trying to understand what “load balancing” means for a website. The website will be used by several users and resources (database, web service, ..).

If anyone can help me understand the concept of load balancing for the asp.net website, I would really appreciate it. Thanks.

+6
load-balancing
source share
8 answers

One problem with load balancing that you might want to learn about during development is where you store your session state. This MSDN article provides a good overview of your capabilities.

If you deploy your asp.net system using off-process or sql-server-mode session management, this will give you additional flexibility later if you decide to introduce a load balancer for your deployed system:

  • Your load balancer should not handle session proximity. As one of the posters mentioned above, all modern balancing balancers cope with it in any case, so this is in any case a minor consideration.
  • Web gardens (a kind of IAS / server-implemented load balancer) DEMANDS the use of session management "out of process" or "sql-server-mode". Therefore, if your system is already configured in this way, you will be one step closer to the possibility of using web gardens.
+4
source share

What it is? Load balancing simply refers to the distribution of workload between two or more computers. As a concept, it is not unique to asp.net. Although separate machines for your database and web server can be called "load balancing", it most often refers to the use of several machines to serve one role, for example, the presence of several web servers.

If you are worried about this? Probably not. Already have performance issues? Are your databases and web server on their machines? If you find that your server’s resources are tight, it will probably be easier to scale (more powerful single machine) than from (load balancing). These days, a dedicated field can handle LOT traffic if your code matches.

+1
source share

Load balancing in the sense of programming does not apply to ASP.NET; it is applied to the method to try to distribute the load on the server through two or more machines, and not everything that is used on the same machine. If you don't have many thousands (millions?) Of Users, you probably shouldn't worry about that.

For more information, check out the Wikipedia article .

0
source share

Load balancing is not specific to anyone in the technology stack, be it asp.net, jsp, etc. To download the balance, you need to distribute incoming requests to the website on more than one server. This is usually done using a software or hardware load balancer. A load balancer is in front of two or more web servers and delegates incoming traffic. Although this method is not limited to web servers. Load balancing

Enjoy it!

0
source share

I never used it, but the option is IIS Application Request Routing .

IIS Application Request Routing (ARR) 2.0 allows web server administrators, hosting providers and content delivery network (CDN) to increase Web application scalability and reliability through rule-based routing, client and host name affinity, load balancing HTTP server requests and distributed disk caching

0
source share

In a typical web server / database scenario, db is almost always guaranteed to boot the machine first. This is due to the fact that data storage requires more resources. Before you start looking at load balancing on your web server, you need to think about how to load the database balance.

Distributing a single database across multiple servers is much more complicated than balancing the load on a web server. One method that you can use is sharding (or horizontal splitting). Here, some records are stored on one server, and other records on another server. For example, records with identifier 1-900000 are on server 1 and records 900001- are on server 2.

Compared to database load balancing, load balancing across multiple ASP.NET servers is not overly complex. Most session problems can be easily mitigated by using a processing session and / or never talking directly to Application.Cache . On the other hand, balancing data load is complex and requires a lot of planning, trial and error. In most cases, talking to a load-balanced database requires the use of an ORM that supports it (for example, NHibernate) or your own level of data access. The reason is that you need to remove the connection from the code that uses the database, so the solution the database is talking to is processed in one place.

0
source share

the exact solution is to save the session in SQL Server with the stored procedure. To read the stored session procedure "SessionCheck".

0
source share

I would add that this really is nothing to worry about. By the time you need a load balancer, you can probably afford one of the neophyte newfangled with sticky sessions, so you don’t even have to deal with session boogeyman.

-2
source share

All Articles