Skip to main content

Request and Response Buffering

Buffering means that Arvancloud CDN first receives and holds the data of a request or response, and then sends it to its destination. For example, when a user uploads a file to your website, the CDN first receives the whole file and then sends it to the origin server.

If your service delivers streaming content or needs to upload files gradually, you can request a change to the default buffering behavior.

How Buffering Works​

Both request buffering and response buffering are enabled by default.

Request Buffering​

The CDN first receives and buffers all the data sent by the user, such as uploaded files, and then sends it to the origin server. This protects your origin server against very slow uploads.

Note that the maximum size allowed for buffering a request is 4 MiB. If a request that needs buffering is larger than this, the CDN rejects it with the HTTP 413 Payload Too Large status code.

Response Buffering​

The CDN first receives the complete response from the origin server and then delivers it to the user. This frees up the origin server's resources sooner, and a user's slow internet connection doesn't keep your server busy.

Changing Buffering Settings​

If you deliver content such as streaming video or SSE, response buffering must be turned off. If your service needs streaming uploads, meaning files are sent to the origin server gradually, request buffering must be turned off.

Buffering settings are changed through Page Rules. Because changing these settings is sensitive, the related page rule is applied by the Arvancloud support team.

To submit a request, first identify the paths (endpoints) you want to change. Then open a support ticket and state for which paths request buffering or response buffering should be turned on or off.

After reviewing the ticket, the Arvancloud technical team applies the related page rule to your account.