Are there any cons for creating a new ContainerClient for each request?

Devika S 1 Reputation point
2021-03-18T14:37:18.993+00:00

I have multiple containers (2) inside a blob. In that scenario, does creating a new ContainerClient (NodeJS) per request have any disadvantage?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,616 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 45,406 Reputation points Microsoft Employee
    2021-03-18T15:12:32.16+00:00

    @Devika S Welcome to Microsoft Q&A, Thank you for posting your query here!

    No, there is no disadvantage.

    A container organizes a set of blobs, similar to a directory in a file system. A storage account can include an unlimited number of containers, and a container can store an unlimited number of blobs.

    Additional information: Performance and scalability checklist for Blob storage

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Sumarigo-MSFT 45,406 Reputation points Microsoft Employee
    2021-03-31T10:15:57.38+00:00

    @Devika S Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

    The maximum number of container names to retrieve per API call. If the request does not specify the server will return up to 5,000 items.

    When a new container under the specified account is created, If the container with the same name already exists, a ResourceExistsError will be raised. This method returns a client with which to interact with the newly created container.

    The maximum size for a blob to be downloaded in a single call, the exceeded part will be downloaded in chunks (could be parallel). Defaults to 32*1024*1024, or 32MB.

    The maximum chunk size used for downloading a blob. Defaults to 4*1024*1024, or 4MB.

    For more information, refer here, regarding the disadvantage are you facing any issue, If so, please let us know I would like to work closer on this issue.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments