How to handle ASP.NET application variables in load balancing web farms

I am moving a site from a single server to a server farm, which consists of three web servers behind a load balancer. It seems easy to handle session management-just in Load Balancer The above makes the session “sticky” (we evaluated SQL-based session management, but have decided to continue to use InProc session management to improve efficiency).

However, we also used a fairly large The configuration object, we keep it in the Application space (such as Application [ObjName]). Since the configuration object is loaded from memory, we have no problem until someone makes changes to the configuration. At this point, the application on the hosting server will Make changes, and the database will change. However, the other two servers will not change. We have been arguing that there is a “once per minute” polling rule (for example, on a new session) that retains information in the session (not very Effective) and so on. All of these have serious disadvantages. I want to know what others have done. Is it possible to keep the application space on SQL Server, but is the session space in inproc? Any help or insights on how to deal with this issue would be greatly appreciated!

Application [] is always based on local memory, so no matter what code changes you want to make. So put it in other places, such as distributed cache, AppFabric, NCache, memcached.net, etc. The cache is updated when someone makes changes to the configuration, and when you need to read the settings read from the cache. The cache itself is responsible for spreading /Sync.

I’m moving a site from a single server to a server farm, which consists of three web servers behind a load balancer. It seems easy to handle session management-just Make the session “sticky” on Load Balancer (we evaluated SQL-based session management, but decided to continue to use InProc session management to improve efficiency).

However, we also used one Quite a large configuration object, we keep it in the Application space (such as Application [ObjName]). Since the configuration object is loaded from memory, we have no problem until someone makes changes to the configuration. At this time, the hosting server The application will be changed and the database will be changed. However, the other two servers will not be changed. We have been arguing that there is a “once per minute” polling rule (e.g. on a new session) to keep information in the session (Not very effective) Wait. All of these have serious shortcomings. I want to know what others have done. Is it possible to keep the application space on SQL Server, but is the session space in inproc? Any help or insights on how to deal with this issue would be greatly appreciated!

Application [] is always based on local memory, so no matter what code changes you want to make. So put it elsewhere, such as distributed cache , AppFabric, NCache, memcached.net, etc. The cache is updated when someone makes changes to the configuration, when you need to read the settings read from the cache. The cache itself is responsible for propagation/synchronization.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2433 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.