LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2012, 11:27 AM   #1
lce411
Member
 
Registered: Jul 2012
Posts: 50

Rep: Reputation: Disabled
Virtual IP


Hi,

I am trying to create some redundancy/load balancing for two Squid servers, that we are mostly using as web filters. All of the servers in the network are configured to look for the original Squid server IP, but I've cloned that machine (through VMWare) to create the second Squid server. I would like to avoid changing the config files on all the servers in the environment, so it was suggested that I use a VIP. How do I create a VIP and have both the original Squid and the cloned Squid servers sit behind it? I know I will have to change the IP's of the Squid servers, since I want the VIP to have the IP of the original (to avoid having to change it throughout the environment). Any help or other suggestions for achieving my goal of redundancy/load balancing would be greatly appreciated.

Would this be easily achieved by using NAT and iptables? If so, how?

Last edited by lce411; 07-25-2012 at 02:17 PM.
 
Old 07-26-2012, 06:41 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://www.linuxvirtualserver.org/ details good solutions for a vip, BUT do you really want to do this? If you're looking to benefit from caching then it doesn't really make sense to round robin multiple proxies. On servers I would generally look to just use a failover solution, and for browsers (i.e. with more advanced proxy client capabilites) you can use a clever proxy.pac trick and use a hash of the uri to reliably send requests for the same resources to the same proxy, and still have full HA under a different model. http://www.novell.com/coolsolutions/appnote/12952.html you mention servers more than client though, so the mileage is limited, but as above, I would actively recommend pure active / passive over load balancing if your clients can't use a proxy.pac.
 
Old 07-26-2012, 08:31 AM   #3
lce411
Member
 
Registered: Jul 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
http://www.linuxvirtualserver.org/ details good solutions for a vip, BUT do you really want to do this? If you're looking to benefit from caching then it doesn't really make sense to round robin multiple proxies. On servers I would generally look to just use a failover solution, and for browsers (i.e. with more advanced proxy client capabilites) you can use a clever proxy.pac trick and use a hash of the uri to reliably send requests for the same resources to the same proxy, and still have full HA under a different model. http://www.novell.com/coolsolutions/appnote/12952.html you mention servers more than client though, so the mileage is limited, but as above, I would actively recommend pure active / passive over load balancing if your clients can't use a proxy.pac.
I think this is a better way to describe what I'm asking:

Is it possible to have a simple IP failover setup, such as with keepalived, with 2 physical servers, without using LVS?

2 physical servers. No load balancing needed. Server1 can do all the work while its up. If Server1 goes down, Server2 picks up the slack.

There is no third server or router that is monitoring Server1 and Server2, so there would be no single point of failure.

Can I do this with a simple keepalived configuration on each server?
 
Old 07-26-2012, 08:33 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you could do that, yes. There's an even easier approach really, as it can all be scripted pretty trivially. I tend to come back to this article... http://onlamp.com/pub/a/onlamp/2003/...inuxhacks.html
 
Old 07-26-2012, 10:13 AM   #5
lce411
Member
 
Registered: Jul 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
you could do that, yes. There's an even easier approach really, as it can all be scripted pretty trivially. I tend to come back to this article... http://onlamp.com/pub/a/onlamp/2003/...inuxhacks.html
Thanks for the site reference. It looked like it could definitely be of use. I think at this point it's obvious I've never done anything like this, so I keep getting confused on the part of actual IP's versus virtual or NAT'd IP's. Let's say I have a server with an IP of 192.168.100.10 and I want to add a redundant server of 192.168.100.11. Servers on the network are already configured to send requests to 192.168.100.10, since it's the original, so how does the redundant server get configured so that there's no IP conflict and the other servers still only see 192.168.100.10? Is that only capable through NAT? Would an alias work as well, or is there any other solution to that?
 
Old 07-27-2012, 01:45 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
NAT? Where would NAT come into the equation?

In the page I linked to it is done via an alias, so you'd change the main address of the primary server to something else, and put the old address back on as an alias on the same interface.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Machines are not appearing in Virtual Manager after reboot the RHEL5.5 Serve Shanker.K Linux - Newbie 7 04-11-2012 06:20 AM
LXer: Proxmox VE - An Open Source virtualization platform for running Virtual Appliances and Virtual LXer Syndicated Linux News 0 02-13-2011 04:20 PM
LXer: Deja Vu: IBM Pushes Virtual Linux Desktops With Virtual Bridges (Again) LXer Syndicated Linux News 0 01-25-2011 12:40 PM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM
LXer: IBM, Virtual Bridges and Canonical Offer Ubuntu-based Virtual Desktop LXer Syndicated Linux News 0 12-05-2008 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration