[squid-users] squid external address to be sequential from list of addresses
Alex Rousskov
rousskov at measurement-factory.com
Sat Jul 20 20:09:33 UTC 2019
On 7/20/19 6:49 AM, --Ahmad-- wrote:
> i need squid to have sequential outgoing addresses over specified list .
>
> say i want an ip:port for that connection .
> and have pool of 10 address .
> is it possible with squid to match 1st ip as external for 1st request .
> 2nd ip for 2nd request .
> 3rd ip for 3rd request
>
> until reach end , then the cycle span again ?
>
> im thinking of how can do it with marking acl or so ?
If you need to round-robin outgoing addresses for requests on the same
persistent connection, then a long list of annotation ACLs may be
sufficient (but awkward!) way of doing that. If you understand how
annotations helped avoid multiple matches in your random-based
configuration, you may be able to build the corresponding configuration
for this use case as well. If not, please post your failed attempts with
analysis why you think they should have worked and ask questions -- this
will avoid the impression of abusing the mailing list for doing your own
legwork.
If you need to round-robin outgoing address across all cache misses,
then you will probably have to either write an external ACL (that sets
the right annotation) or add a new "round robin" ACL type to Squid
sources. The latter requires development, of course. I recommend
starting with the external ACL if you need this functionality (and later
optimize with a new built-in ACL type if really needed).
In all of these use cases, please note that you are configuring which
outgoing address Squid should use. The order of those
decisions/assignments may not match the order in which Squid opens new
connections and/or sends requests. Connection opening delays and other
factors may change the order, deviating from the strict round-robin rules.
HTH,
Alex.
More information about the squid-users
mailing list