Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've hired a lot of proxies from different providers which are used by our apps. This list gets changed sometimes (once in 2-3 months). To make our life easier we want to configure an aggregating proxy which have to use the hired proxies and balance requests.

The questions are:

  • is this possible to use Squid for this? Any other solutions if no?
  • provide the config sample please
share|improve this question

migrated from Jun 25 '12 at 19:45

This question came from our site for computer enthusiasts and power users.

It should be possible, just use several cache_peer, combined with cache_peer_access to create some acls to control which peer to use for based on criteria. I have no examples though. – Zoredache Jun 25 '12 at 18:06
up vote 4 down vote accepted

Yes, you can use squid for this purpose. Have a look at the cache_peer directive. You can even make squid load-balance between multiple parent proxies:

cache_peer parent 3128 0 round-robin no-query
cache_peer parent 3128 0 round-robin no-query

3128 in this example is the port of the parent proxy to connect to. 0 would be the ICP port but I assume you don't have that kind of close relationship with the proxy parents so it can be set to 0.

See the online documentation, especially the section about cache_peer for more information.

share|improve this answer
And what if my proxies require base http authentication? – Maksym Polshcha Jun 25 '12 at 22:19
Check the documentation of the cache_peer directive. There is an entire section of authentication options via the "login" option. You can specify a username/password combination, you can choose to passthrough the credentials given by the browser, etc. etc. Something like "cache_peer parent 3128 0 round-robin no-query login=username:password" should work fine. – mghocke Jun 26 '12 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.