• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

Cost vs Priority in DNS

Hi Experts,


I've been trying to understand the real difference between Cost and Priority in regards to DNS.

Example, if you have Round Robin setup, and you have 2 A records pointing to 2 different IP addresses, it'll split the load between them.

IF you have 2 different MX records, you can use cost or priority to have it utilize one server more than the other.

In the second case, what would the be difference between configuring cost or priority. Why would you configure one over the other?

Thanks.
0
LegendZM
Asked:
LegendZM
  • 5
  • 4
  • 4
  • +1
2 Solutions
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
When dealing with MX records I believe cost and priority are referring to the same thing.
0
 
LegendZMPrincipal Security ArchitectAuthor Commented:
What about other things, generally speaking?  when dealing with mx specifically which would be recommended? Cost or Priority?
0
 
Brian PiercePhotographerCommented:
Priority specifies which is the preferred record.
Cost is not a DNS term (My MX records have prioritesis but no cost) costs are normally an aribitary value assoicated with a particular route (in a routing table for example). When routers determine which path to send packets on, if there is a choice they will use the lowest cost route.

 
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
What I'm trying to say is that "cost" and "priority" are the same thing in an MX record. You can call it what you want but I believe most people refer to it as the priority.

Where did you hear/read the term "cost" referring to an MX record? Maybe I can help explain what they mean (or maybe my thinking will get adjusted)...
0
 
Brian PiercePhotographerCommented:
Thats my thinking also -
DNS Priorites OK -
DNS Costs ??

Now if we were taking about SRV records they have a Priority and a Weighting which can be confusing - but again there is no "cost"
0
 
LegendZMPrincipal Security ArchitectAuthor Commented:
That's what I meant, sorry for the confusion, Dns Priority and Weight.
0
 
Netman66Commented:
Priority is used to determine preferred servers for the service (lowest number is highest priority).

Weighting is used for load balancing the service.

Normally, you don't have to change any of these numbers (with maybe the exception of the MX record priority) since AD Sites control much of the way lookups are referred.  A client will always be directed to a server in his/her own site for the service being requested IF that service is running on a local resource.

0
 
Brian PiercePhotographerCommented:
OK glad we got that sorted as Netman66 says - if on doubt leave them alone !!
0
 
LegendZMPrincipal Security ArchitectAuthor Commented:
What does the weight do in the load balance situation?

So if you have 2 IIS servers, one priority at 100 the other at 50, more requests will go to the lower server? and if it's down, then it'll be referred to the other srever? Or will it split the load, in a 2:1 ratio, or is this where weight comes in?

Can you please give me some examples as to when you would enter weight specifically instead of Priority? Is it only when you have the 2 servers configured as a cluster/load balance? the one with the lower weight will handle more?
0
 
Brian PiercePhotographerCommented:
Yes weight is in effect  a ratio and only comes into play when two records have the same priority and load balancing is being used.
0
 
Netman66Commented:
I should clarify this a little.

Service Records (SRV) are used to refer clients requesting services via DNS to a server that hosts that service (example: kerberos or ldap).

Priority is normally all the same by default.  If two servers in the same site host the same service it will use Round Robin to balance the load.  Otherwise, you can set the priority so that only one server always manages the service you're tweaking.

If your AD is healthy and replicating and your Sites and Subnets are all configured properly then the clients will get correctly referred to their appropriate servers.

There is a small issue with DNS at times in that a client may authenticate to a non-local server if their referral cache is not current.  At times, the client may deem the local server not available and move to the next nearest server to use.  The local referal cache gets updated and as long as that new server stays alive it rarely changes (a reboot normally cures it).

Unless you know with absolute certainty how the outcome of your changes will impact the Directory I would advise against changing numbers on SRV records.  The MX records could likely be changed without too much problem since you may want all traffic to always hit an edge server (for example) rather than a server somewhere else in the org (unless the edge is down), then it should default to the next priority.

Hope that helps a bit.
0
 
Netman66Commented:
This explains things pretty nicely.

http://en.wikipedia.org/wiki/SRV_record

Weighting only becomes a factor against two servers given the same priority.  A value of 0 disables weighting and speeds up SRV record enumeration because you're not forcing DNS to check two or more sources for availability.

0
 
LegendZMPrincipal Security ArchitectAuthor Commented:
Thank you both Netman and KCT.

Kct, so weight basically creates a ratio? ex: if one record is 50 and another is 100, the ratio would be 1:2 (or 2:1) The higher the weight the better or lower, like priority?
Do you have to enable the load balancing feature in windows? or by adjusting weight are you effectively load balancing?
0
 
LegendZMPrincipal Security ArchitectAuthor Commented:
Netman, so if you have 2 servers with the priority the same, but weight different, it'll then spilt a ratio between the 2 servers,  based on what their weight is regardless of round robin?
0
 
Netman66Commented:
In theory, yes.  However we are speaking only about SRV records - this isn't meant for IIS-type load balancing (that's what Load Balancing on the NIC is for).

Two servers with the same priority will round-robin *if* they are in the same site as the client.

Honestly, there really is little need to change any of those numbers unless you have a very, very specific reason.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now