I've set up Redis as a proof of concept but the escalation of the costs as the tiers go up is a little concerning. I can't find any information about how much TempData is used and what for making it difficult to pick a size.
Does anyone have any guide on what service tier would be required in a production environment?
Are there better options for the distributed cache?
We're just looking at this too (we've just gone live with a load-balanced Azure Web Apps site that we've migrated to v10 from v8) and it looks like you can use SQL Server Distributed cache fairly easily (we're not using auto-scale - we load balance using Application Gateway - so I'm not sure if the below applies, but I'm going to ask support since we're a Gold Partner :)):
Does anybody know when Umbraco actually writes to the distributed cache?
As per Chris' question above, what would be the level of Redis cache required for a production environment?
The site we are looking at is extremely large (~15k content items, ~100k media items), but since there's no information about what is written to the cache it's not at all clear what sort of level is required, and they become prohibitively expensive at higher tiers.
I've set up a SQL Server Distributed cache for our test server using the documentation here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-6.0, but I'm seeing nothing written to it (1 back office, 1 front end) - does anybody know of a way to test this reliably? Do I somehow need to tell Umbraco that a distributed cache exists? I can see from the source code that both .AddWebsite() and .AddBackoffice call .AddDistributedCache(), but this seems to be just the instruction cache that Umbraco uses to ensure publishing from the back office to the front-end works.
We ended up using a basic SQL Server Distributed cache - it was fairly cost effective and seemed to work well for our purposes. I never really found out when Umbraco writes to the cache though, I guess we'd have to dig through the source code to figure it out!
I am doing something similar, but not sure whats happening, maybe I must be missing something, all dependencies and middlewares are added before Umbraco middlewares and services.
I think when I checked, when running locally there was never any data written to the distributed cache db; I assume it was written to while running across multiple servers, but I no longer have access to that database so I can't check :)
Umbraco 9 + Azure Redis Distributed Cache for autoscaling
Hey,
I'm looking at moving hosting to Azure and I'm just testing out the performance (which has been excellent so far).
The docs Session State & Distributed Cache state that Umbraco needs a distributed cache as it uses TempData.
I've set up Redis as a proof of concept but the escalation of the costs as the tiers go up is a little concerning. I can't find any information about how much TempData is used and what for making it difficult to pick a size.
Does anyone have any guide on what service tier would be required in a production environment?
Are there better options for the distributed cache?
Cheers C
We're just looking at this too (we've just gone live with a load-balanced Azure Web Apps site that we've migrated to v10 from v8) and it looks like you can use SQL Server Distributed cache fairly easily (we're not using auto-scale - we load balance using Application Gateway - so I'm not sure if the below applies, but I'm going to ask support since we're a Gold Partner :)):
https://our.umbraco.com/documentation/fundamentals/setup/server-setup/Load-Balancing/#session-state-and-distributed-cache
https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-6.0#distributed-sql-server-cache
Does anybody know when Umbraco actually writes to the distributed cache?
As per Chris' question above, what would be the level of Redis cache required for a production environment?
The site we are looking at is extremely large (~15k content items, ~100k media items), but since there's no information about what is written to the cache it's not at all clear what sort of level is required, and they become prohibitively expensive at higher tiers.
I've set up a SQL Server Distributed cache for our test server using the documentation here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-6.0, but I'm seeing nothing written to it (1 back office, 1 front end) - does anybody know of a way to test this reliably? Do I somehow need to tell Umbraco that a distributed cache exists? I can see from the source code that both .AddWebsite() and .AddBackoffice call .AddDistributedCache(), but this seems to be just the instruction cache that Umbraco uses to ensure publishing from the back office to the front-end works.
Thanks in advance! :)
Hi Chris,
Are you able to find a solution for this?
We ended up using a basic SQL Server Distributed cache - it was fairly cost effective and seemed to work well for our purposes. I never really found out when Umbraco writes to the cache though, I guess we'd have to dig through the source code to figure it out!
Great, did you tried the exact same configuration as referred on the microsoft documentation https://learn.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-6.0#distributed-sql-server-cache
I tried the same but couldn’t see anything logging on my table, do I need to consider anything else?
We did - our config looked like this, with the cache settings coming from the appSettings.json file so we could set them per environment:
SqlCacheSettings class:
I am doing something similar, but not sure whats happening, maybe I must be missing something, all dependencies and middlewares are added before Umbraco middlewares and services.
I think when I checked, when running locally there was never any data written to the distributed cache db; I assume it was written to while running across multiple servers, but I no longer have access to that database so I can't check :)
is working on a reply...