Results 1 to 3 of 3

Thread: proxy

  1. #1
    Associate
    Join Date
    Oct 2004
    Location
    Karachi
    Posts
    12

    proxy

    how to setup squid, in envorinment if one squid server down or to much load on one server so second squid server starts work or users queries are automatically switched to another one

  2. #2
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re: proxy

    Dear ammad,
    Salam,

    Quote Originally Posted by ammad
    how to setup squid, in envorinment if one squid server down or to much load on one server so second squid server starts work or users queries are automatically switched to another one
    FYI, http://www.squid-cache.org/Doc/FAQ/FAQ-5.html#ss5.4

    and you can also write shell script which will check server load and if server load is high then it will transfer traffic to another squid server

    Best Regards.
    Frrkh hmd

  3. #3
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re:

    Dear ammad,
    Salam,

    I have found this from redhat mailing list it might be implement

    We have finally been able to add redundant squid boxes so we don't die when one goes down. I'm wondering how I can distribute the traffic between the two boxes. Googling didn't turn up much on automatic load balancing so the second best would be to manually distribute traffic
    between the two using iptables. Unfortunately I didn't come up with any
    config's for that either. Would the following work?

    I'll try ASCII art to show our setup and how I'm trying to route
    traffic.

    ___________ ____________ ____________ _______
    | | | | | | | |
    | 7206 | | | | squid1 | | |
    | router |>>>>| packteer |>>>>| iptables |>>>>>>| PIX |>>>[internet]
    |_________| |__________| |__________| ^ |_____|
    ~ ^
    ~ ^
    __________ ^
    | | ^
    | | ^
    | squid2 |>>>^
    |________|


    What I was hoping to do was to use iptables on squid1 to redirect some
    traffic to a squid process locally and redirect the rest to a squid
    process on squid2. Will this work? Will the following come close to
    doing the job?

    # Send some traffic to squid2
    iptables -t nat -A PREROUTING -i eth0 -s xx.xx.xx.xx/xx -p tcp \
    --dport 80 -j DNAT --to squid2:3128

    # Let the rest go to squid1
    iptables -t nat -A PREROUTING -i eth0 -s xx.xx.xx.xx/xx -p tcp \
    --dport 80 -j REDIRECT --to-port 3128

    Perhaps the source spec '-s xx.xx.xx.xx' can be left off the second line
    so that specified traffic goes to squid2 and everything else stays on
    squid1 (yes/no)?

    Thanks.
    https://listman.redhat.com/archives/.../msg00711.html

    Best Regards.
    Frrkh hmd

Similar Threads

  1. Help for Squid 3 Proxy
    By ddlinux in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 04-26-2011, 09:15 PM
  2. Squid PROXY
    By brukutu in forum Windows - General Topics
    Replies: 1
    Last Post: 04-07-2008, 06:31 PM
  3. Proxy
    By Devil in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 11-15-2006, 03:30 AM
  4. Proxy Script
    By asi.linux in forum Programming
    Replies: 1
    Last Post: 04-20-2006, 04:53 PM
  5. Proxy and Intranet...
    By Sonic Revenge in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 05-22-2002, 05:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •