1

I have configured a squid proxy server which has many parent servers. I have distributed the load using round-robin but I don't like it. Most of the time only one or two servers are working out of 5.I get an error some times because of that. So what I want to do is somehow select the best parent automatically and then connect.Can it be done somehow?

I believe It can be done using ICP. I saw this link and they are using it in some form. (I don't know anything about ICP)


Here's what I have done:

cache_peer parentip1 parent 3128 0 login=username:password round-robin no-query
cache_peer parentip2 parent 3128 0 login=username:password round-robin no-query
cache_peer parentip3 parent 3128 0 login=username:password round-robin no-query
cache_peer parentip4 parent 3128 0 login=username:password round-robin no-query
cache_peer parentip5 parent 3128 0 login=username:password round-robin no-query
2
  • read some more, write some code, show us that – chicks Sep 2 '15 at 12:46
  • Which version of Squid are you using? – mc0e Sep 3 '15 at 10:35
5
+50

You've answered your own question already. Yes, That's what ICP is for.

What you need to do next is read up on ICP. "I don't know anything about ICP" is not a good question for serverfault, but by all means come back with more specific questions once you've made a start.

4
  • Ok Thanks for answering.I want to read more about it, please give me some reliable link or source. – Raman Sep 5 '15 at 7:27
  • I can't really vouch for any particular page, but from a search, deckle.co.uk/squid-users-guide/cache-hierarchies.html looks worth reading. There are other technologies around besides ICP. Your situation with most servers down at any given time is unusual, and may break the efficiency of some. It's hard for anyone to offer you much help there though without more info on things like how frequently servers go up and down, latency between servers, and maybe whether it's the servers going up and down or network interruptions, etc. – mc0e Sep 5 '15 at 19:00
  • You should also look at the options to cache_peer introduced by the latest versions of squid, though you likely won't find apt repositories for them. – mc0e Sep 5 '15 at 19:01
  • The servers go up and down every 15-20 minutes. Most of the time only 1 or 2 out of 5 are working. Latency is 1-2 ms and the servers are actually going up and down, they are not network interruptions.I'll read the link you provided and try to come up with a solution. Thank you very much for all your help. – Raman Sep 5 '15 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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