Proposed Synchronizing Static Data

  • lunes, 20 de febrero de 2012 14:28
     
     

    Hello,

    I am considering moving an existing web application to a farm environment from a single server.  It uses SQL Server for session management but has several static (singleton) memory-based application data caches that will need to remain synchronized on all servers.  It also uses HttpRuntime cache in several places.  Does the new Web Farm Framework provide for synchronizing these caches or do I need to use AppFabric and if so, how would this be done?

    I would like to:

    • Identify anything that stores statically in app domain or in IIS memory cache.  Singletons are the first thing that come to mind and we have several.
    • Create a strategy to handle either transitioning from in-memory storage or synchronizing those storage points.  This includes HttpRuntime cache uses.
    • Make sure session info is stored in Sql server, not memory [It is]
    • Make sure our cache refreshers will work across web servers
    Thanks

    Dave Nordin

Todas las respuestas

  • miércoles, 22 de febrero de 2012 4:01
     
     Respuesta propuesta

    Hello,

    Web Farm Framework is intended to provide provisioning of servers on a NLB environment using ARR and other IIS components but is not related with cache. To provide centrilized cache you need AppFabric.

    It all depends how you are caching the data, if you are just referencing static objects or variables, and that needs to be in sync on all your nodes you will probably need to change your code to accomplish that.

    Anything that is stored on ASP.net cache or output cache will be easily moved to the a NLB scenario using AppFabric.