Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Using DNS Internally
PostPosted: Sat Jan 14, 2012 9:51 pm 
Offline
Newbie

Joined: Sat Jan 14, 2012 9:46 pm
Posts: 4
Hello,

I'm interested in having multiple servers for my application, and wanted to know what the best way would be to have them refer to each other internally. For example, an application server in a staging environment (app01.staging) would connect to a database server in staging (db01.staging), instead of using internal ip addresses.

Should I just use the DNS manager, and have the servers point to their full external domain name? Or would that count against bandwidth while also being slower?

Thanks


Top
   
 Post subject:
PostPosted: Sun Jan 15, 2012 3:29 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
You have probably three options:
1. Put the addresses in the public DNS
2. Run your own nameserver, and serve the private addresses only to your own hosts
3. Put the addresses in the /etc/hosts file of each host

#1 is probably the least work, since you only have to maintain the information in one place. However, some have a philosophical objection to putting private IP addresses in the public DNS. Here is a debate if you're interested. Note that your names would be fully qualified (e.g., db01.staging.example.org instead of db01.staging). Also note that when you change an IP address it will take some time to propagate.

#2 centralizes the list of hosts in one place, and avoids exposing private addresses to the whole Internet. It is probably the most "correct" way, but is IMO too much work unless you're managing many names (dozens), especially if you're not used to running your own nameserver.

#3 is simple, although you need to keep the /etc/hosts file up to date on each host. Though I don't know all the specifics of your situation, this would tend to be my first choice. One advantage is that connections between the hosts can be made without doing a DNS lookup (but only if your nsswitch.conf puts "files" before "dns" for host lookups). When you change the /etc/hosts file on a particular (virtual) machine, it takes effect immediately.


Top
   
 Post subject:
PostPosted: Mon Jan 16, 2012 10:23 am 
Offline
Newbie

Joined: Sat Jan 14, 2012 9:46 pm
Posts: 4
Hey Vance,

Thanks for the reply. I started to use option 1, and put the private IP's into the public DNS system offered by Linode, and I am getting what I need.

Any idea using public DNS would make internal transfer count toward my bandwidth limit?

Thanks!


Top
   
 Post subject:
PostPosted: Mon Jan 16, 2012 10:32 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
rsosinski wrote:
Any idea using public DNS would make internal transfer count toward my bandwidth limit?

That would depend on which IP address you put in there. Private IP = no charge.


Top
   
 Post subject:
PostPosted: Tue Jan 17, 2012 10:58 pm 
Offline
Newbie

Joined: Sat Jan 14, 2012 9:46 pm
Posts: 4
hybinet,

Great, that works for me.

I now got everything setup exactly how I want it now. Thanks for all the help everyone.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group