Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] FQDN as Real Server reference

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


slists at thekilobyte

Feb 27, 2009, 8:30 AM

Post #1 of 8 (999 views)
Permalink
[lvs-users] FQDN as Real Server reference

Hello,

I have a question about LVS. Iım working on setting up a load balanced
solution that will do routing/NAT, so that the lVS is a hairpin or
termination point for VIPs, which will then source NAT requests to real
servers. So far so good, not a big challenge as I read the docs.

But for the round robin association to real servers, I need LVS to do a DNS
query to a list of real servers referenced by DNS name rather than IP. Then
based on the result of DNS, goto that IP that time for the real server.

VIP: VIP.1
real-server: host1.dns.com (not an IP)
real-server: host2.domain.com


Does LVS have the capability to have a FQDN as a real-server? And if so, is
there any config for caching? Ideally, I want a DNS query each time a VIP is
hitting the real-server pool, so that it always gets the latest info from
the DNS server.

Thanks for any insight!

-steve


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


malcolm at loadbalancer

Feb 27, 2009, 11:10 AM

Post #2 of 8 (971 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

Steve,

That sounds really daft, from a performance perspective. Although I do
recall wanting to do a similar thing with firewall rules in the past
i.e. dynamic rules.

LVS definitely doesn't do that.

Haproxy will balance on a DNS entry, not sure if it caches the results
though (probably).







2009/2/27 Stjohnson <slists [at] thekilobyte>
>
> Hello,
>
> I have a question about LVS. Iım working on setting up a load balanced
> solution that will do routing/NAT, so that the lVS is a hairpin or
> termination point for VIPs, which will then source NAT requests to real
> servers. So far so good, not a big challenge as I  read the docs.
>
> But for the round robin association to real servers, I need LVS to do a DNS
> query to a list of real servers referenced by DNS name rather than IP. Then
> based on the result of DNS, goto that IP that time for the real server.
>
> VIP: VIP.1
>    real-server: host1.dns.com (not an IP)
>    real-server: host2.domain.com
>
>
> Does LVS have the capability to have a FQDN as a real-server? And if so, is
> there any config for caching? Ideally, I want a DNS query each time a VIP is
> hitting the real-server pool, so that it always gets the latest info from
> the DNS server.
>
> Thanks for any insight!
>
> -steve
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users



--
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)870 443 8779
http://www.loadbalancer.org/

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


jmack at wm7d

Feb 27, 2009, 12:53 PM

Post #3 of 8 (958 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

On Fri, 27 Feb 2009, Stjohnson wrote:

> Does LVS have the capability to have a FQDN as a real-server?

ipvsadm uses hostnames. If you want to output IPs you use
the -n option

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


malcolm at loadbalancer

Feb 27, 2009, 1:41 PM

Post #4 of 8 (959 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

Joe,

But isn't that just in the reports?
i.e. my ip is x.x.x.x therefore its bob.bobsstuff.com
but as far as routing is concerned within the kernel LVS it only uses
the pre-set ip address?




2009/2/27 Joseph Mack NA3T <jmack [at] wm7d>:
> On Fri, 27 Feb 2009, Stjohnson wrote:
>
>> Does LVS have the capability to have a FQDN as a real-server?
>
> ipvsadm uses hostnames. If you want to output IPs you use
> the -n option
>
> Joe
>
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>



--
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)870 443 8779
http://www.loadbalancer.org/

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


jmack at wm7d

Feb 27, 2009, 4:59 PM

Post #5 of 8 (966 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

On Fri, 27 Feb 2009, Malcolm Turnbull wrote:

> Joe,

our answers to the original poster are so different, it's
likely that neither of us understand the problem.

;-)

> But isn't that just in the reports? i.e. my ip is x.x.x.x
> therefore its bob.bobsstuff.com but as far as routing is
> concerned within the kernel LVS it only uses the pre-set
> ip address?

yes

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


slists at thekilobyte

Feb 27, 2009, 7:37 PM

Post #6 of 8 (962 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

Both of you are right on. I think you both understand. FQDN for Real server
definition, not IP. So For load balancing, the LVS has to do a DNS query.

The ipvs does show dns names, but it's a reverse query, not so much
responsible for the allocation of load.

So it's looking like I'm not going to be able to do this LVS. I'm
investigating other solutions actually just to cover all my bases. There has
to be a system that does this w/o special modifications.


Thanks!


On 2/27/09 6:59 PM, "Joseph Mack NA3T" <jmack [at] wm7d> wrote:

> On Fri, 27 Feb 2009, Malcolm Turnbull wrote:
>
>> Joe,
>
> our answers to the original poster are so different, it's
> likely that neither of us understand the problem.
>
> ;-)
>
>> But isn't that just in the reports? i.e. my ip is x.x.x.x
>> therefore its bob.bobsstuff.com but as far as routing is
>> concerned within the kernel LVS it only uses the pre-set
>> ip address?
>
> yes
>
> Joe




_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Feb 28, 2009, 3:19 AM

Post #7 of 8 (946 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

On Fri, 2009-02-27 at 21:37 -0600, Stjohnson wrote:
> Both of you are right on. I think you both understand. FQDN for Real server
> definition, not IP. So For load balancing, the LVS has to do a DNS query.

You're quite right in thinking that LVS won't do that.

> The ipvs does show dns names, but it's a reverse query, not so much
> responsible for the allocation of load.

Right.

> So it's looking like I'm not going to be able to do this LVS. I'm
> investigating other solutions actually just to cover all my bases. There has
> to be a system that does this w/o special modifications.

If this is for web services, you could use Squid. What you're really
after is a proxy, not a load balancer per se. Note however that in most
cases this sort of application will be running on an OS which caches the
results of DNS queries for a while (depending on config) - the inbuilt
resolver in glibc might do this, plus the queried nameservers tend to
deliver the same result and many apps use the first result they receive.

If you're looking to do something whereby you automatically add/remove
hosts as realservers without having to modify the load balancer
itself... I'm not aware of one. Sorry!

>From a different perspective, this doesn't seem like a very efficient
way of handling incoming queries - a lookup for every "hit"? Do you mean
every connection, or every single packet?

Graeme


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


windo at p6drad-teel

Mar 2, 2009, 12:56 AM

Post #8 of 8 (924 views)
Permalink
Re: [lvs-users] FQDN as Real Server reference [In reply to]

Hi

Stjohnson wrote:
> So it's looking like I'm not going to be able to do this LVS. I'm
> investigating other solutions actually just to cover all my bases. There has
> to be a system that does this w/o special modifications.

Is there a particular reason why periodic updates would not work?

Pseudocode:

VIP=1.2.3.4
DOMAIN=realservers.domain.com
while true; do
sleep 10
clear_ipvsadm $VIP
for ip in $(dig +short $DOMAIN); do
add_realserver $ip
done
done

Is it a special modification? It may be better to dynamically update the
VIP instead of a flush though.

Siim


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.