I'm starting to use Azure Storage to save files to blobs on my application. Since my application could be accessing different containers on different storages I would like to know how to implement a connection pool that will optimize resources.
I want to keep the connection open to the different containers instead of opening a connection each time I try to download a blob
Can anyone provide me with the best approach to achieve this?
Thanks
Simple answer to your question is that you can't really keep a connection open to Azure Storage as it is essentially an HTTP connection which is Request/Response based. You make a request to Azure Storage and it sends you a response and then the connection is terminated.
In fact Azure Storage would not allow you to keep a single connection open for a long duration as it is a service and it needs to serve many clients like yours. So if you try to perform an operation which takes longer than the threshold specified by Azure Storage Service, the service will timeout your request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With