APIM Maximum message size

Prasenna Kannan 46 Reputation points
2022-05-17T04:21:31.783+00:00

Team,

I'm building a POC where client has to upload 500MB file to Azure Storage.

In regards with that, Azure Storage connection would be wrapped inside an API. The API will push the stream to Azure Storage.

I'm seeking clarifications on below :

1) Function App will be hosted in APIM - does APIM have any upper limit on the message size?
2) What is the best way to upload a big file to Azure Storage? Can we expose the Azure Storage connection string directly to the client?
3) Retrieval of the file should be based on the Storage Account URL. How best we can accomplish the retrieval of the file?

Thanks,

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,679 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,076 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,346 questions
{count} votes

Accepted answer
  1. Lohith GN 511 Reputation points
    2022-05-18T01:33:08.187+00:00

    Hi.

    APIM does not have any request payload limit per se for HTTP endpoints. The bottleneck will be the internet connection at your client-side.

    Here is documentation that lists the limits in APIM - https://github.com/MicrosoftDocs/azure-docs/blob/main/includes/api-management-service-limits.md. If your APIM tier is consumption then there is a 1GB max request payload size. Otherwise no limit.

    You can write a client of your own - where you can upload the file using smaller chunks to your API. And then the API i.e. Fx in this case can copy the file to Storage.

    For retrieval - the storage should not be exposed directly to the client. Your API i.e. Fx should be the facade to your files. You can have an endpoint that lists the file & another endpoint that will download the file given the identifier.

    Another way is to use what is known as Shared Access Signature. You can provide the Shared Access Signature to your client and they can use that to upload the file. SAS is a secure URI that you should share only with known parties. But even then you will need a custom client side code which can chunk the file and upload the chunks to Blob. Here is a stack overflow answer which explains this well https://stackoverflow.com/a/58741171/63534

    Hope this helps.

    0 comments No comments

0 additional answers

Sort by: Most helpful