Python socket.send buffer has default value 8192.
We receive data in big chunks with prox_rec_res.read(65536) but we send them
in much smaller chunks (8192) to the client. We should use the same
size to improve performance.
We also didn't use TCP_NODELAY for the proxy client and enabling it
helps performance.
Python
socket.send
buffer has default value 8192. We receive data in big chunks withprox_rec_res.read(65536)
but we send them in much smaller chunks (8192) to the client. We should use the same size to improve performance.We also didn't use
TCP_NODELAY
for the proxy client and enabling it helps performance.