› Forums › Network Management › ZeroShell › Load balancing rule to identify larger file downloads? › Reply To: Load balancing rule to identify larger file downloads?
I can see the that in the config for Squid for example:
“You can set the global reply_body_max_size parameter. This option controls the largest HTTP message body that will be sent to a cache client for one request.
If the HTTP response coming from the server has a Content-length header, then Squid compares the content-length value to the reply_body_max_size value. If the content-length is larger,the server connection is closed and the user receives an error message from Squid. “
Is there a way I can identify this content-length value in a rule?
I am not an expert in this but I doubt you can make a routing rule for this.
The HTTP header that Squid is looking at is buried in the middle of a TCP connection. Which means the connection has been setup and thus the routing decision has already been made.
Beyond that, I am not aware of an available balancing filter that can look into the contents of a TCP stream like that. The ones I’ve looked at make their decision on the first packet they receive. Or for protocols like SIP or FTP, are monitoring the control stream to see what data streams are being setup.