Usage of Cloud Storage in Umbraco v16
I hope you are doing well folks.
We are developing a portal for a client. And would like to make use of Cloud storage like S3 and Azure Storage, … etc. And we have found an open-source official implementation of Azure and one for S3 at the marketplace.
The problem started when we were examining the source code (both projects). This file system operations in Umbraco architecture design is designed to be ‘Synchronous’ in nature, which is okay (not ideal) in case the CMS is accessing a file in a local storage (OS & Disk-cache makes these operations totally synchronous). But if the file were located on a network drive or some Cloud service (Network IO are needed) then all sorts of problems will happens because these operations will result in a direct ‘Asynchronous’ operations because of essential network IO needed. And in both libraries (Azure Storage & S3), you will find the anti pattern ‘sync-over-async’ is used! You will find a pattern like the following ‘.GetAwaiter().GetResult() or .Result()’. This later will result in degraded performance and Thread Pool starvation.
Any idea on how to approach this problem?
See these Github Issues
- Multiple open read requests in Azure · Issue #77 · umbraco/Umbraco.StorageProviders · GitHub
- Blob Storage requests slow down significantly when there are multiple concurrent requests to blob storage. · Issue #78 · umbraco/Umbraco.StorageProviders · GitHub
Thank you.