Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th November 2008, 21:34
xdanx xdanx is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Exclamation How can i make load balancing with BIND 9?

Hello,
I'm having a frustrating issue here, and i cant find a viable solution after searched howtos for a month...

My setup is as follows : i have 2 server, with 2 different public IP addresses. I'm running BIND on both of them, and i did setup them according the http://www.howtoforge.com/traditional_dns_howto as follows: 1 slave and 1 master.
I dont want to make load balancing between them, and also i want to make a "failover" situation. I dont know if this is the corret term. Basicly, if one server is down [ having no internet connection] i want to redirect all users who access my website to the other server who is already mirroring the content. And i want to do this with BIND, because i dont have the resources to use a hearthbeat server.
I found that i can use SRV options, to make a load balancing and a failover situation. and my setup looks like this : [ the domain and ips are changed ]
Code:
[the SOA thing ]..

$TTL 28800
@ IN NS ns1.example.org.
@ IN NS ns2.example.org.
example.org.      A 192.168.0.1
ns1             A 192.168.0.1
ns2             A 172.16.10.1

$TTL 84
_http._tcp.www.example.org.        IN SRV 0 1 80 www.example.org.
                                   IN SRV 1 1 80 www2.example.org.

www.example.org.          IN A 192.168.0.1
www2.example.org.         IN A 172.16.10.1
The problem is if i stop apache / bind on 192.168.0.1, and i flush dns records on my computer, when i try to access http://www.example.org i get Connection timed out , but no redirection.

Knowing this, can you give me any ideea, or a link to a resource i can consult ? Everywhere i go, it says the same thing : use SRV records and it works 100%. But in my case, it doesn't.

Also, I am interested in any possibility to do what i want to do. I can modify the nameservers pointing to my servers in the Root NS.

Thx a lot for reading,
Dan
Reply With Quote
Sponsored Links
  #2  
Old 10th November 2008, 12:21
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

DNS is a bad solution for HA setups because DNS records are almost always cached, so you can never be sure what answer a client gets for a DNS query (even if it's working for you).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th November 2008, 21:03
xdanx xdanx is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

But what if i set the TTL for let's say 60s? I made a research on google NSs, they have set TTL for 84s, and they are using round robin DNS, with 4 ips.
And speaking of this, isn't round robin a form a load balancing ? I'd use that method if it wasn't 1 problem : the round robin thingy cannot control whether the server is "dead" or online..
Supposing we don't get cached, is there any method i can make what i want ?

Thx,
Dan
Reply With Quote
  #4  
Old 11th November 2008, 14:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by xdanx View Post
But what if i set the TTL for let's say 60s?
That doesn't help you if other name servers don't care about the TTL and use a caching mechanism. There are lots of caching nameservers out there.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
xdanx (11th November 2008)
  #5  
Old 11th November 2008, 18:26
xdanx xdanx is offline
Junior Member
 
Join Date: Nov 2008
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

Ok then. Thx a lot for your help. I think i'll just try to find another solution.
Reply With Quote
Reply

Bookmarks

Tags
bind 9, fail-over, srv records

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Denied Bind Slave Server Problems wxman Server Operation 17 22nd March 2014 12:30
High Availability (Load Balancing) behind a firewall geek.de.nz Server Operation 7 4th January 2011 13:58
how to make load balancing in centos 5 fauzan Installation/Configuration 1 10th June 2008 14:52
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29
Bind-Chroot-Howto (Debian) spaz HOWTO-Related Questions 5 9th March 2006 14:50


All times are GMT +2. The time now is 23:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.