Cache, Session, ViewState and Application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LeAnne

    Cache, Session, ViewState and Application

    My question is to do with scalability and the location for storate of cache,
    session, viewstate and application data.

    Application - Data is stored in memory (in process)
    Session - Data is stored in memory (in process or out of process)
    - can be configured to store the session data in sql server (which relates
    to my question)
    ViewState - Page (but can be modified to overwrite the storage mechanism to
    store viewstate else where, esp Sesssion)
    Cache - Data is stored in memory (in process)


    Considering the above (if i'm not wrong), storing data in session state in
    web farms with the session data stored in sql server is the best and right
    option.
    So that if the first request is processed by computer A, and some data is
    set in the session, then if the next request by the same user is processed
    by computer b the session info will be available (as its stored in sql
    server).

    What about if information is stored in the cache???
    I.e. if in the first request the page stores some info in the cache
    (computer A), and the next request is processed by computer B, then WOULD
    the cache information be available????

    Where is the cache data stored??
    In process or out of process??
    Can this storage location be configured?


  • Göran Andersson

    #2
    Re: Cache, Session, ViewState and Application

    You could also consider storing (small amounts of) data in cookies. The
    cookies are stored in the browser, and are sent along in every request.

    The cache is stored in-process. AFAIK it cant be stored anywhere else.

    If you for instance stored a database result in the cache, and the cache
    would be stored in the database, that would be rather useless, right?

    LeAnne wrote:
    My question is to do with scalability and the location for storate of cache,
    session, viewstate and application data.
    >
    Application - Data is stored in memory (in process)
    Session - Data is stored in memory (in process or out of process)
    - can be configured to store the session data in sql server (which relates
    to my question)
    ViewState - Page (but can be modified to overwrite the storage mechanism to
    store viewstate else where, esp Sesssion)
    Cache - Data is stored in memory (in process)
    >
    >
    Considering the above (if i'm not wrong), storing data in session state in
    web farms with the session data stored in sql server is the best and right
    option.
    So that if the first request is processed by computer A, and some data is
    set in the session, then if the next request by the same user is processed
    by computer b the session info will be available (as its stored in sql
    server).
    >
    What about if information is stored in the cache???
    I.e. if in the first request the page stores some info in the cache
    (computer A), and the next request is processed by computer B, then WOULD
    the cache information be available????
    >
    Where is the cache data stored??
    In process or out of process??
    Can this storage location be configured?
    >

    Comment

    • Alvin Bruney [MVP]

      #3
      Re: Cache, Session, ViewState and Application

      >Considering the above (if i'm not wrong), storing data in session state in
      >web farms with the session data stored in sql server is the best and right
      >option.
      I am no fan of these blanket statements. Stateserver does outperform sql
      server for session storage all things considered so sql server is not always
      the best and right option

      --
      _______________ _________
      Warm regards,
      Alvin Bruney [MVP ASP.NET]

      [Shameless Author plug]
      Professional VSTO.NET - Wrox/Wiley
      The O.W.C. Black Book with .NET
      www.lulu.com/owc, Amazon
      Blog: http://www.msmvps.com/blogs/alvin
      -------------------------------------------------------


      "Göran Andersson" <guffa@guffa.co mwrote in message
      news:%23pWM7lCo GHA.4248@TK2MSF TNGP02.phx.gbl. ..
      You could also consider storing (small amounts of) data in cookies. The
      cookies are stored in the browser, and are sent along in every request.
      >
      The cache is stored in-process. AFAIK it cant be stored anywhere else.
      >
      If you for instance stored a database result in the cache, and the cache
      would be stored in the database, that would be rather useless, right?
      >
      LeAnne wrote:
      >My question is to do with scalability and the location for storate of
      >cache, session, viewstate and application data.
      >>
      >Application - Data is stored in memory (in process)
      >Session - Data is stored in memory (in process or out of process)
      >- can be configured to store the session data in sql server (which
      >relates to my question)
      >ViewState - Page (but can be modified to overwrite the storage mechanism
      >to store viewstate else where, esp Sesssion)
      >Cache - Data is stored in memory (in process)
      >>
      >>
      >Considering the above (if i'm not wrong), storing data in session state
      >in web farms with the session data stored in sql server is the best and
      >right option.
      >So that if the first request is processed by computer A, and some data is
      >set in the session, then if the next request by the same user is
      >processed by computer b the session info will be available (as its stored
      >in sql server).
      >>
      >What about if information is stored in the cache???
      >I.e. if in the first request the page stores some info in the cache
      >(computer A), and the next request is processed by computer B, then WOULD
      >the cache information be available????
      >>
      >Where is the cache data stored??
      >In process or out of process??
      >Can this storage location be configured?

      Comment

      Working...