Should Webfarms Share ASPState databases RRS feed

  • Question

  • User36623851 posted

    I have a webfarm named webfarm-A using shared configuration (not replication).  Each node in the farm is pointing at the SQL server ASPState database for session state.  I have been tasked to create an additional webfarm called webfarm-B.  Is it a good idea to point webfarm-B at the same ASPState database that webfarm-A is using?  Should webfarms share ASPState databases?

    Friday, October 16, 2015 12:12 PM


All replies

  • User753101303 posted


    Up to you. The apps found on those 2 farms are related or not? How many apps will you have etc... If you do then if this state server is down both web farms won't work. Would it damage the spacetime continuum or don't we care ? etc... etc.... Do you have another server handy or would it be too costly etc... etc...

    This is the kind of question nobody can answer for you. As always this is a tradeoff and it depends on your own scalability and disaster recovery criteria.

    Friday, October 16, 2015 12:54 PM
  • User36623851 posted


      I understand the performance implications, I am not exactly sure how sessionids are created.  I was wondering if it was possible if 2 webfarms that use the same AspStateTempSessions table if either farm could duplicate a sessionid?  For example webfarm-a creates sessionid-BlahBlah123 with variable FirstName-Tom.  webfarm-b creates sessionid-BlahBlah123 with variable FirstName-John.  User hits webfarm-b gets John back but when hits webfarm-a gets Tom back.

    Is this even possible, or are sessionIds created in a way that it is impossible for two different webfarms to ever generate the same sessionid?



    Monday, October 19, 2015 11:50 AM
  • User475983607 posted

    I understand the performance implications, I am not exactly sure how sessionids are created.

    If you used aspnet_regsql.exe to create a default table schema then you already have a schema where each application has a unique session.  Take a few minutes out of your day to do a bit of research.



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 20, 2015 10:40 AM