Apache HTTP Server Version 2.4
Description: | Support for request buffering |
---|---|
Status: | Extension |
Module Identifier: | buffer_module |
Source File: | mod_buffer.c |
Compatibility: | Available in Apache 2.3 and later |
This module provides the ability to buffer the input and output filter stacks.
Under certain circumstances, content generators might create content in small chunks. In order to promote memory reuse, in memory chunks are always 8k in size, regardless of the size of the chunk itself. When many small chunks are generated by a request, this can create a large memory footprint while the request is being processed, and an unnecessarily large amount of data on the wire. The addition of a buffer collapses the response into the fewest chunks possible.
When httpd is used in front of an expensive content generator, buffering the response may allow the backend to complete processing and release resources sooner, depending on how the backend is designed.
The buffer filter may be added to either the input or the
output filter stacks, as appropriate, using the
SetInputFilter
,
SetOutputFilter
,
AddOutputFilter
or
AddOutputFilterByType
directives.
AddOutputFilterByType INCLUDES;BUFFER text/html
Description: | Maximum size in bytes to buffer by the buffer filter |
---|---|
Syntax: | BufferSize integer |
Default: | BufferSize 131072 |
Context: | server config, virtual host, directory, .htaccess |
Status: | Extension |
Module: | mod_buffer |
The BufferSize
directive specifies the amount of data in bytes that will be
buffered before being read from or written to each request.
The default is 128 kilobytes.