What are the risks of placing an ASP.NET application in a Load Balancing environment?

6

Regarding the code ... is there any risk that might affect my application from the moment it works in a Load Balancing scenario?

    
asked by Arthur Menezes 12.06.2015 в 22:04

1 answer

8

1. Sessions

Sessions are a common problem in systems written for a machine only running in a partitioned environment. The first approaches to ASP.NET were quite flawed, and were fixed with some strategies, such as using a state server .

All user information and navigation information should be on a machine outside the rest of the cluster , this is because keeping the session between the cluster machines caused inconsistency of information.

This article teaches you how to implement a session partitioning scheme for your site . The change on your site is minimal, starting with Web.config .

2. Dealing with files

Similarly, we can say that load-balanced environments must have a dedicated server to host the files separately from machines that serve a particular ASP.NET MVC system.

The reason is the same as Sessions : avoid inconsistency. Depending on how the implementation is done, there is a risk that a file will rise to only one of the machines. The strategy of replicating files to other machines may seem tempting, but it can lead to even more inconsistencies because, in theory, there is no mechanism to ensure file synchronization within ASP.NET MVC. Of course, there may still be alternatives that will ensure the synchronicity of the files, but out of technology and out of standards.

    
12.06.2015 / 22:17