I'm trying to set up a forward proxy using apache2 inside a docker container with limited RAM and CPU. And want to set a lower buffer size for both receive and send. Can it be done at the kernel level? .
I tried writing to the /proc/sys/net/core/rmem_default and /proc/sys/net/core/wmem_default in the container but such files are not available inside the container.
If buffer values cannot be set at the kernel level, can it be done at the userspace level, using apache modules?
However, I can set Receive buffer with ProxyReceiveBufferSize.
Is there a way to set a value for Send Buffer as well?
I came across the mod_buffer module.
I'm tried to use mod_buffer in a virtual host. But I'm getting an error: BufferSize not allowed in <VirtualHost> context. I didn't find any working examples on the internet.
<VirtualHost *:8080>
ProxyRequests On
ProxyVia On
BufferSize 131072
ErrorLog /var/log/apache2/forward_proxy_error.log
CustomLog /var/log/apache2/forward_proxy_access.log combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
Is there any other solution? and how to use the mod_buffer module? An example configuration would be helpful.