none
In what scenarios the session would be lost

    Question

  • All, Supposed there is only 1 instance configured for the web role to avoid the inconsistent session issue in the load balance. and I would use the In-Proc SessionStateProvider to manage session state for the webrole.  

    My question is in what cases would make the session in the web role lost ?I already knew the regular maintenance performed by Windows AZure would make the web role start over which definitely make the session data lost. 

    But I want to know how often the regular maintenance of Web Role happened? thanks.

    Best Regards






    • Edited by wq187731 Tuesday, August 27, 2013 2:45 AM
    Monday, August 26, 2013 6:17 AM

Answers

  • regardless of whether you deploy to Azure or not, you need to evaluate what session management approach do you need.

    i can't categorically say whether you should go for in-proc, state server, etc... without knowing exactly what you store or how you use session. (perhaps you don't even need server-based sessions).

    you should look at the advantages/disadvantages of the different mechanisms.

    what happens to your app if the session gets lost? what happens if you deploy to a webfarm? etc...

    Tuesday, August 27, 2013 3:58 AM
  • Oh, I made a mistake, thanks for point out. I delete my first answer.

    yeah ,I agree with JuneT.

    And I think you just want to know how often will the webrole crash is that right?

    For meet Azure SLA, a webrole's crash hour should in 8.76 hours a year.

    If you only have a single web role, your customer will get error when your webrole crash.

    But I think 8.76 hours a year can be accepted.. 


    Please mark post as answered if it helped!


    Tuesday, August 27, 2013 3:31 PM

All replies

  • Hi , Yuan2013, I know there are some solutions for session state management in the WebRole, But I asked question here is not for the solution, Because I already knew the solution. I just want to know why. Please review my questions, I don't know if I did put them clearly, If I didn't , please let me know. and any comments are appreciated. thanks.
    • Edited by wq187731 Tuesday, August 27, 2013 2:43 AM
    Tuesday, August 27, 2013 2:42 AM
  • i don't think you'll get a definitive answer on the regular maintenance schedule for Web Roles. 

    having said that, you should not only be worried about web roles maintenance affecting your session state.

    you can lose session state even if there's no web role maintenance on-going.

    for example, an AppDomain or worker process recycle can happen on your app or on IIS itself.

    Tuesday, August 27, 2013 2:53 AM
  • Hi , JuneT, Can I say what you mean is we better use the out-of proc or independent State Server for session management even if we don't deploy our web app as the Web Role? Please correct me if it is wrong. thanks.

    Best Regards



    • Edited by wq187731 Tuesday, August 27, 2013 3:35 AM
    Tuesday, August 27, 2013 3:09 AM
  • regardless of whether you deploy to Azure or not, you need to evaluate what session management approach do you need.

    i can't categorically say whether you should go for in-proc, state server, etc... without knowing exactly what you store or how you use session. (perhaps you don't even need server-based sessions).

    you should look at the advantages/disadvantages of the different mechanisms.

    what happens to your app if the session gets lost? what happens if you deploy to a webfarm? etc...

    Tuesday, August 27, 2013 3:58 AM
  • Right, What I undertand from your post is whether the data stored in the session would be lost or not matter with the system's work depends on the system business or design. for example say you would use the session to store the user credential when the user succeed to log in the system. for some reason . the session time out or iis recycle etc. have no doubt , the user credential in session would be lost. For this kind of exception, I think we could simply redirect web request to login page. let the user login again. no matter what session management we use (in-proc, out-proc etc...)

    I hope I understand it well. If I didn't , please try to correct me . thanks.

    Best Regards 


    • Edited by wq187731 Tuesday, August 27, 2013 5:46 AM
    Tuesday, August 27, 2013 5:44 AM
  • Oh, I made a mistake, thanks for point out. I delete my first answer.

    yeah ,I agree with JuneT.

    And I think you just want to know how often will the webrole crash is that right?

    For meet Azure SLA, a webrole's crash hour should in 8.76 hours a year.

    If you only have a single web role, your customer will get error when your webrole crash.

    But I think 8.76 hours a year can be accepted.. 


    Please mark post as answered if it helped!


    Tuesday, August 27, 2013 3:31 PM