Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection pooling on Azure Storage

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

like image 981
HobojoeBr Avatar asked Jul 02 '14 12:07

HobojoeBr


1 Answers

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.

like image 151
Gaurav Mantri Avatar answered Oct 04 '22 08:10

Gaurav Mantri