Sometimes slow media with Umbraco 11/12 with Azure...
# help-with-umbraco
m
We're noticing that sometimes media requests are extremely slow when using Umbraco 11/12 with the Azure Blob Storage. I've also saw this post: https://our.umbraco.com/forum/using-umbraco-and-getting-started/111648-u10-blob-storage-for-media-very-slow With the switch from 9, the ImageSharp processor is now used instead of the custom one in Umbraco. The ImageSharp provider uses the FileSystemProvider from the Umbraco package. This uses sync methods instead of async methods to access the blob, could it be related to that? Is anyone seeing issues as well?
k
I've had really slow images on blob storage. I couldn't figure out why. So I ended up adding azure CDN for everything within the /media path
Just be sure that you are ignoring query strings so that you can generate a separate image for each query string variation
m
Yeah that was my alternative, I'm unable to get a proper reproduction scenario (when I do it locally connected with the Blob Storage everything seems fine) and it doesn't happen all the time. But when it happens it's extremly slow... I've tried to collect some profiler traces but they always show empty (no stacks, no proper information)
k
For me it seemed to be the blob storage that was slow. I'm not sure if it was confused about which assets should be served frequently or something. It didn't happen on our testing environment so my guess is that a few users where enough to throttle it somehow. We got a ton of timeouts in the media section of the backoffice all the time, it was practically unusable. The CDN has fixed all the problems .
s
j
If you're not load balanced, then using
AddAzureBlobImageSharpCache()
will likely be worse for performance as ImageSharp will have to talk over the network to the files as opposed to using the local disk.
As said above, CDN is the way to go whatever, but it would be better if Umbraco's file system providers were async.