Multi Site ASP.NET Session Sharing across Regions

Your application may be running in multiple regions actively and serving regional traffic with location affinity. In this scenario, you may occasionally need to redirect some or all of the traffic to another location either to handle overflow or disaster recovery. But, when this happens, you don't want your users to lose their ASP.NET Sessions if their request is routed to a different region.

Intelligent Multi Site ASP.NET Session Replication

To handle these situations, NCache provides an intelligent multi-site ASP.NET Session support. This allows your ASP.NET application to share ASP.NET Sessions across the WAN seamlessly but without replicating the entire sessions which has significant bandwidth cost associated with it.


Mirrored Cache


NCache achieves this by letting you define one primary and multiple secondary ASP.NET Session State caches in your ASP.NET web.config. All ASP.NET sessions are originally stored in their primary cache.

  <section name="ncache"
                 Alachisoft.NCache.SessionStateManagement, Version=x.x.x.x, 
                 Culture=neutral, PublicKeyToken=CFF5926ED6A53769"/>

    <primaryCache id="London_Cache"
                  sid-prefix = "LDC"/>
    <secondaryCache id="NewYork_Cache"
    <secondaryCache id="Tokyo_Cache"

However, when a request gets routed to another location, NCache Session State Provider (SSP) intelligently detects that the session for this user resides in one of the other locations and automatically moves it from there to this new location. Then, this user's request can be served from this new location from this point onward. This allows the user to seamlessly continue using your application.


What to Do Next?