Session Maintanance in Application under Web Role

Hi,

We have planned to migrate our application to web role as web role splits the server traffics to other instances. We have some queries regarding that . Let me post it one by one.

1) Since web role involves multiple instances (redirecting to different servers at run time based on the number of instances created), what happens to my session related details which was maintained in one server (with inproc mode will get resides in iis ) when my next requests gets redirected to other server where my session related details wont be available know? Do the windows azure takes a copy of that too or do we need to manully handle?

2)Our application works like Presentation Layer makes a call to the web service which in turn queries the database and results are displayed accordingly (presentation -> webservice -> database). So when am making my presenataion layer as cloud service web role obvioulsy i would need to make my service also as a web role . Am i right?

  2.1) If so, what happens when am making the request from presentation how the requests will get carried ?

  2.2) Am having my database in a separated vm (not azure db) hosted in sql express when the service dynamically 

creates multiple instances what happens to database part?

  2.3) Shall we host service and presenation in same cloud service or different which will be preferrable one?

May 29th, 2015 3:16am

Hi ,

 Any suggestions ?



Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 5:08am

Hi ,

 Any suggestions ?



  • Edited by Selva17392 Friday, May 29, 2015 9:07 AM
May 29th, 2015 9:07am

Hi ,

 Any suggestions ?



  • Edited by Selva17392 Friday, May 29, 2015 9:07 AM
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 9:07am

Hi,

Any Updates?

June 1st, 2015 1:44am

Its been 2 days since i didnt get any updates?
Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2015 12:28am

Hi,

  Sorry for the delayed respose, Hope my replies answers your questions.
 
  1) Since web role involves multiple instances (redirecting to different servers at run time based on the number of instances created), what happens to my session related details which was maintained in one server (with inproc mode will get resides in iis ) when my next requests gets redirected to other server where my session related details wont be available know? Do the windows azure takes a copy of that too or do we need to manully handle?
   Ans: If you are running a Single server, going for InProc session state will just work, if you have multiple servers(instances), managing session state may be a challenge, You will have to design your service to maintain the session state in a central storage. Azure gives you many options to achieve this. Refer to the below link on some of the common options.
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-service/
   http://blogs.msdn.com/b/cie/archive/2013/05/17/session-state-management-in-windows-azure-web-roles.aspx
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-azure-redis-cache/#what-is-azure-redis-cache
   http://wely-lau.net/2011/08/13/various-options-to-manage-session-state-in-windows-azure/
  
  2)Our application works like Presentation Layer makes a call to the web service which in turn queries the database and results are displayed accordingly (presentation -> webservice -> database). So when am making my presenataion layer as cloud service web role obvioulsy i would need to make my service also as a web role . Am i right?
   Ans: Azure Cloud service is perfectly suited for Multi Tier Applications, Normally a webrole is used for the web tier(frontend) and a worker role for the logic (backend), and database or datastorage as the last tier. A Worker role is nothing but a Webrole without the ISS installed. Its upto you to make the decision to use either WebRole or Worker Role to host your service part.
       Refer: http://serena-yeoh.blogspot.in/2014/01/layered-applications-and-windows-azure.html
  
   2.1) If so, what happens when am making the request from presentation how the requests will get carried ?
    Ans: If your roles belong to the same cloud service they can be reached through the internal endpoints. You can get the internal IP address of your roles and the ports and establish communication.
    Refer: https://msdn.microsoft.com/library/azure/hh180158.aspx
   
   2.2) Am having my database in a separated vm (not azure db) hosted in sql express when the service dynamically creates multiple instances what happens to database part?
       Refer This Sample : http://cloudsample.codeplex.com/
   
   2.3) Shall we host service and presenation in same cloud service or different which will be preferrable one?
      Ans: You would ideally want all the roles in the same cloud service, having them in different cloud service means you inter-role communication will be routed through a load balancer which would add latency.
  
Regards,
Nithin Rathnakar

June 2nd, 2015 1:20am

Hi,

  Sorry for the delayed respose, Hope my replies answers your questions.
 
  1) Since web role involves multiple instances (redirecting to different servers at run time based on the number of instances created), what happens to my session related details which was maintained in one server (with inproc mode will get resides in iis ) when my next requests gets redirected to other server where my session related details wont be available know? Do the windows azure takes a copy of that too or do we need to manully handle?
   Ans: If you are running a Single server, going for InProc session state will just work, if you have multiple servers(instances), managing session state may be a challenge, You will have to design your service to maintain the session state in a central storage. Azure gives you many options to achieve this. Refer to the below link on some of the common options.
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-service/
   http://blogs.msdn.com/b/cie/archive/2013/05/17/session-state-management-in-windows-azure-web-roles.aspx
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-azure-redis-cache/#what-is-azure-redis-cache
   http://wely-lau.net/2011/08/13/various-options-to-manage-session-state-in-windows-azure/
  
  2)Our application works like Presentation Layer makes a call to the web service which in turn queries the database and results are displayed accordingly (presentation -> webservice -> database). So when am making my presenataion layer as cloud service web role obvioulsy i would need to make my service also as a web role . Am i right?
   Ans: Azure Cloud service is perfectly suited for Multi Tier Applications, Normally a webrole is used for the web tier(frontend) and a worker role for the logic (backend), and database or datastorage as the last tier. A Worker role is nothing but a Webrole without the ISS installed. Its upto you to make the decision to use either WebRole or Worker Role to host your service part.
       Refer: http://serena-yeoh.blogspot.in/2014/01/layered-applications-and-windows-azure.html
  
   2.1) If so, what happens when am making the request from presentation how the requests will get carried ?
    Ans: If your roles belong to the same cloud service they can be reached through the internal endpoints. You can get the internal IP address of your roles and the ports and establish communication.
    Refer: https://msdn.microsoft.com/library/azure/hh180158.aspx
   
   2.2) Am having my database in a separated vm (not azure db) hosted in sql express when the service dynamically creates multiple instances what happens to database part?
       Refer This Sample : http://cloudsample.codeplex.com/
   
   2.3) Shall we host service and presenation in same cloud service or different which will be preferrable one?
      Ans: You would ideally want all the roles in the same cloud service, having them in different cloud service means you inter-role communication will be routed through a load balancer which would add latency.
  
Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2015 5:19am

Hi,

  Sorry for the delayed respose, Hope my replies answers your questions.
 
  1) Since web role involves multiple instances (redirecting to different servers at run time based on the number of instances created), what happens to my session related details which was maintained in one server (with inproc mode will get resides in iis ) when my next requests gets redirected to other server where my session related details wont be available know? Do the windows azure takes a copy of that too or do we need to manully handle?
   Ans: If you are running a Single server, going for InProc session state will just work, if you have multiple servers(instances), managing session state may be a challenge, You will have to design your service to maintain the session state in a central storage. Azure gives you many options to achieve this. Refer to the below link on some of the common options.
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-service/
   http://blogs.msdn.com/b/cie/archive/2013/05/17/session-state-management-in-windows-azure-web-roles.aspx
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-azure-redis-cache/#what-is-azure-redis-cache
   http://wely-lau.net/2011/08/13/various-options-to-manage-session-state-in-windows-azure/
  
  2)Our application works like Presentation Layer makes a call to the web service which in turn queries the database and results are displayed accordingly (presentation -> webservice -> database). So when am making my presenataion layer as cloud service web role obvioulsy i would need to make my service also as a web role . Am i right?
   Ans: Azure Cloud service is perfectly suited for Multi Tier Applications, Normally a webrole is used for the web tier(frontend) and a worker role for the logic (backend), and database or datastorage as the last tier. A Worker role is nothing but a Webrole without the ISS installed. Its upto you to make the decision to use either WebRole or Worker Role to host your service part.
       Refer: http://serena-yeoh.blogspot.in/2014/01/layered-applications-and-windows-azure.html
  
   2.1) If so, what happens when am making the request from presentation how the requests will get carried ?
    Ans: If your roles belong to the same cloud service they can be reached through the internal endpoints. You can get the internal IP address of your roles and the ports and establish communication.
    Refer: https://msdn.microsoft.com/library/azure/hh180158.aspx
   
   2.2) Am having my database in a separated vm (not azure db) hosted in sql express when the service dynamically creates multiple instances what happens to database part?
       Refer This Sample : http://cloudsample.codeplex.com/
   
   2.3) Shall we host service and presenation in same cloud service or different which will be preferrable one?
      Ans: You would ideally want all the roles in the same cloud service, having them in different cloud service means you inter-role communication will be routed through a load balancer which would add latency.
  
Regards,
Nithin Rathnakar

June 2nd, 2015 5:19am

Hi,

  Sorry for the delayed respose, Hope my replies answers your questions.
 
  1) Since web role involves multiple instances (redirecting to different servers at run time based on the number of instances created), what happens to my session related details which was maintained in one server (with inproc mode will get resides in iis ) when my next requests gets redirected to other server where my session related details wont be available know? Do the windows azure takes a copy of that too or do we need to manully handle?
   Ans: If you are running a Single server, going for InProc session state will just work, if you have multiple servers(instances), managing session state may be a challenge, You will have to design your service to maintain the session state in a central storage. Azure gives you many options to achieve this. Refer to the below link on some of the common options.
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-service/
   http://blogs.msdn.com/b/cie/archive/2013/05/17/session-state-management-in-windows-azure-web-roles.aspx
   https://azure.microsoft.com/en-in/documentation/articles/cache-dotnet-how-to-use-azure-redis-cache/#what-is-azure-redis-cache
   http://wely-lau.net/2011/08/13/various-options-to-manage-session-state-in-windows-azure/
  
  2)Our application works like Presentation Layer makes a call to the web service which in turn queries the database and results are displayed accordingly (presentation -> webservice -> database). So when am making my presenataion layer as cloud service web role obvioulsy i would need to make my service also as a web role . Am i right?
   Ans: Azure Cloud service is perfectly suited for Multi Tier Applications, Normally a webrole is used for the web tier(frontend) and a worker role for the logic (backend), and database or datastorage as the last tier. A Worker role is nothing but a Webrole without the ISS installed. Its upto you to make the decision to use either WebRole or Worker Role to host your service part.
       Refer: http://serena-yeoh.blogspot.in/2014/01/layered-applications-and-windows-azure.html
  
   2.1) If so, what happens when am making the request from presentation how the requests will get carried ?
    Ans: If your roles belong to the same cloud service they can be reached through the internal endpoints. You can get the internal IP address of your roles and the ports and establish communication.
    Refer: https://msdn.microsoft.com/library/azure/hh180158.aspx
   
   2.2) Am having my database in a separated vm (not azure db) hosted in sql express when the service dynamically creates multiple instances what happens to database part?
       Refer This Sample : http://cloudsample.codeplex.com/
   
   2.3) Shall we host service and presenation in same cloud service or different which will be preferrable one?
      Ans: You would ideally want all the roles in the same cloud service, having them in different cloud service means you inter-role communication will be routed through a load balancer which would add latency.
  
Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2015 5:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics