Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mscommunities 40 posts 95 karma points
    Dec 03, 2015 @ 18:28
    mscommunities
    0

    Azure web app + load balancing + Session state

    Based on this blog post from Microsoft, we should be using a shared caching strategy for session state if we are load balancing umbraco on azure web apps, https://azure.microsoft.com/en-us/blog/scalable-umbraco-cms-solution-for-azure-web-apps/. I don't see any mention of this on the umbraco load balancing documentation, https://our.umbraco.org/documentation/Getting-Started/Setup/Server-Setup/load-balancing/flexible.

    What should we do?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 03, 2015 @ 18:54
    Jeavon Leopold
    0

    It's in the "Common load balancing setup information" section on this page

  • mscommunities 40 posts 95 karma points
    Dec 03, 2015 @ 19:28
    mscommunities
    0

    I missed that, thanks. So if our code isn't using session and isnt using the TempDataProvider, are we fine with turning off session state? Or does umbraco need it for something?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 04, 2015 @ 08:16
    Jeavon Leopold
    0

    I think that you are but I've not tested it myself as we almost always have some TempData somewhere. For Azure we always use the Redis Session State provider, it's very easy to setup and very quick.

  • James Strugnell 84 posts 192 karma points
    Dec 21, 2015 @ 14:25
    James Strugnell
    0

    Hi Jeavon, I'm interested to know which tier of the Redis Cache you use? It seems that if you go for "Standard" (the first tier that is "Production-ready") and also go for the C2 plan (the first which is not "Low" network performance) then that will cost in the region of £103 per month. We wanted to implement Redis but that cost quickly put us off. I can see you can get a basic/low option for £10 per month but I can't imagine this will be reliable.

    Those numbers are pulled from here: https://azure.microsoft.com/en-gb/pricing/details/cache/

    Cheers, James.

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 22, 2015 @ 09:27
    Jeavon Leopold
    2

    Hi James,

    I think a Standard C0 (approx £30 pcm) is fine for most websites requiring session state for TempData or basic logins. What is very important to get right is the timeouts when using the provider, below are the settings we have found to be optimal.

        <add name="AzureRedisSessionStateStore" 
             type="Microsoft.Web.Redis.RedisSessionStateProvider" 
             host="mycache.redis.cache.windows.net" 
             accessKey="" 
             ssl="true" 
             retryTimeoutInMilliseconds="50000" 
             connectionTimeoutInMilliseconds="5000" 
             opertationTimeoutInMilliseconds="10000" 
             throwOnError="false" />
    

    There is more detail on this here

    Hope that's helpful.

    Jeavon

  • James Strugnell 84 posts 192 karma points
    Dec 22, 2015 @ 09:33
    James Strugnell
    0

    Cool, thanks Jeavon. Can you use the same Redis Cache for multiple websites?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 22, 2015 @ 09:48
    Jeavon Leopold
    0

    Yes, it hasn't occurred to me but I suppose you could. Azure Redis comes with 16 databases, so I would specify a different DB for each site.

    Just add the following attribute

     databaseId = "10"
    
  • James Strugnell 84 posts 192 karma points
    Dec 22, 2015 @ 11:36
    James Strugnell
    0

    Nice. Makes it a bit more economical if we can spread that cost. Thanks again.

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 22, 2015 @ 14:20
    Craig100
    0

    If we use the Microsoft.Web.Redis.RedisSessionStateProvider as shown above and have "<sessionState mode="Custom" customProvider="AzureRedisSessionStateStore">" do we have to do any fancy coding or does it just take over the old fashioned session and cache destinations for us? i.e. no change to code required

    TIA

    Craig

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 22, 2015 @ 15:30
    Jeavon Leopold
    0

    You don't need to do anything different, it's "just" another session state provider. But, as with the SQL provider any object you put into the session must be serializable.

Please Sign in or register to post replies

Write your reply to:

Draft