Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Portably control DNS clouds using java or bash

Subscribe to updates I use denominator

Statistics on denominator

Number of watchers on Github 471
Number of open issues 28
Average time to close an issue 1 day
Main language Java
Average time to merge a PR about 9 hours
Open pull requests 2+
Closed pull requests 7+
Last commit about 4 years ago
Repo Created over 7 years ago
Repo Last Updated about 2 years ago
Size 4.08 MB
Organization / Authornetflix
Page Updated
Do you use denominator? Leave a review!
View open issues (28)
View denominator activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating denominator for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Portable control of DNS clouds

Denominator is a portable Java library for manipulating DNS clouds. Denominator has pluggable back-ends, including AWS Route53, Neustar Ultra, DynECT, Rackspace Cloud DNS, OpenStack Designate, and a mock for testing. We also ship a command line version so it's easy for anyone to try it out. Denominator currently supports basic zone and record features, as well GEO (aka Directional) profiles. See Netflix Tech Blog for an introduction.

Build Status

Command line

For your convenience, the denominator cli is a single executable file. Under the hood, the cli uses airline to look and feel like dig or git.


There's no official android client, yet. However, we do have an Android Example you can try out.


If you are using OSX, Homebrew has a built-in installer for denominator.

Here's how to get denominator-cli 4.6.0 from bintray

  1. Download denominator
  2. Place it on your $PATH. (ex. ~/bin)
  3. Set it to be executable. (chmod 755 ~/bin/denominator)

Getting Started

Advanced usage, including ec2 hooks are covered in the readme. Here's a quick start for the impatient.

If you just want to fool around, you can use the mock provider.

# first column is the zone id, which isn't always its name!
$ denominator -p mock zone list
denominator.io.          denominator.io.                                          admin.denominator.io.                86400
$ denominator -p mock record -z denominator.io. list
denominator.io.                                    SOA   3600   ns1.denominator.io. admin.denominator.io. 1 3600 600 604800 60
denominator.io.                                    NS    86400  ns1.denominator.io.

Different providers connect to different urls and need different credentials. First step is to run ./denominator providers to see how many -c args you need and what values they should have:

$ denominator providers
provider   url                                                 duplicateZones credentialType credentialArgs
mock       mem:mock                                            false
clouddns   https://identity.api.rackspacecloud.com/v2.0/       true           apiKey         username apiKey
designate  http://localhost:5000/v2.0                          true           password       tenantId username password
dynect     https://api2.dynect.net/REST                        false          password       customer username password
route53    https://route53.amazonaws.com                       true           accessKey      accessKey secretKey
route53    https://route53.amazonaws.com                       true           session        accessKey secretKey sessionToken
ultradns   https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01 false          password       username password

Now, you can list your zones or records.

$ denominator -p ultradns -c my_user -c my_password zone list
$ denominator -p ultradns -c my_user -c my_password record --zone netflix.com. list
email.netflix.com.                                 A     3600


Denominator exposes a portable model implemented by pluggable Providers such as route53, ultradns, dynect, clouddns, or mock. Under the covers, providers are Dagger modules. Except for the mock, all current providers bind to http requests via feign, which keeps the distribution light.


The current version of denominator is 4.6.0

Denominator can be resolved as maven dependencies, or equivalent in lein, gradle, etc. Here are the coordinates, noting you only need to list the providers you use.


Getting Started

Creating a connection to a provider requires that you have access to two things: the name of the provider, and as necessary, credentials for it.

import static denominator.CredentialsConfiguration.credentials;
DNSApiManager manager = Denominator.create("ultradns", credentials(username, password)); // manager is closeable, so please close it!

The credentials are variable length, as certain providers require more that 2 parts. The above returns an instance of DNSApiManager where apis such as ZoneApis are found. Here's how to list zones:

for (Zone zone : manager.api().zones()) {
  for (ResourceRecordSet<?> rrs : manager.api().recordSetsInZone(zone.id())) {

If you are running unit tests, or don't have a cloud account yet, you can use mock, and skip the credentials part.

DNSApiManager manager = Denominator.create("mock");

The Denominator model is based on the ResourceRecordSet concept. A ResourceRecordSet is simply a group of records who share the same name and type. For example all address (A) records for the name www.netflix.com. are aggregated into the same ResourceRecordSet. The values of each record in a set are type-specific. These data types are implemented as map-backed interfaces. This affords both the strong typing of java and extensibility and versatility of maps.

For example, the following are identical:


Resource record sets live in a Zone, which is roughly analogous to a domain. Zones can be created on-demand and deleted.

Use via Dagger

Some users may wish to use Denominator as a Dagger library. Here's one way to achieve that:

import static denominator.CredentialsConfiguration.credentials;
import static denominator.Dagger.provider;
// this shows how to facilitate runtime url updates
Provider fromDiscovery = new UltraDNSProvider() {
  public String url() {
    return discovery.urlFor("ultradns");
// this shows how to facilitate runtime credential updates
Supplier<Credentials> fromEncryptedStore = new Supplier<Credentials>() {
  public Credentials get() {
    return encryptedStore.getCredentialsFor("ultradns");
DNSApiManager manager = ObjectGraph.create(provider(fromDiscovery), new UltraDNSProvider.Module(), credentials(fromEncryptedStore))

Third-Party Providers

Denominator also operates with third-party DNS providers such as DiscoveryDNS.

Providers are looked up by name using ServiceLoader. Given the provider is in the classpath, normal lookups should work.

// Given the discoverydns jar is in the classpath
DNSApiManager manager = Denominator.create("discoverydns");

Third-party support is also explained in the CLI readme.


To build:

$ git clone git@github.com:Netflix/denominator.git
$ cd denominator/
$ ./gradlew clean test install

Intellij Idea IDE

Generate the Idea project files:

$ ./gradlew idea

Import the project:

  1. File > Import Project...
  2. Preferences > Compiler > Annotation Processors > Check Enable annotation processing

Run the live tests:

  1. Choose a live test (e.g. CloudDNSCheckConnectionLiveTest)
  2. Right click and select Create CloudDNSCheckConnectionLiveTest
  3. VM options: -ea -Dclouddns.username=<username> -Dclouddns.password=<password>
  4. Working directory: /path/to/denominator/clouddns

Feedback and Collaboration

  • For high-level updates, follow denominatorOSS on Twitter.
  • For questions, please tag denominator in StackOverflow.
  • For bugs and enhancements, please use Github Issues.
  • For email discussions, please post to the user forum
  • For discussions on design and internals, please join #denominator on irc freenode or post to the dev forum


Copyright 2013 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

denominator open issues Ask a question     (View All Issues)
  • over 3 years Graceful handling of API limits for large resource sets
  • almost 4 years NS1 Support
  • about 4 years Denominator needs a champion, or needs to be explicitly archived
  • about 4 years Update download link to latest version in README.md
  • about 5 years Update providers wiki to include support contacts
  • about 5 years WriteLiveTest- Case sensitive match for 'name'
  • about 5 years Control default TTL
  • about 5 years Add Geo support to Route53
  • about 5 years Setup process by which contributors can access shared crendentials
  • about 5 years Any objections to me deleting the old cloudbees jobs?
  • about 5 years Add google cloud dns
  • over 5 years Migrate to UltraDNS new REST Api
  • almost 7 years Add --comment field to "record add" function
  • about 7 years CLI parsing overhead seems a bit excessive
  • about 7 years add mandatory test case to list more than 100 records
  • about 7 years record set versioning
  • about 7 years support load balanced CNAME records
  • about 7 years Create live tests for each record type
  • about 7 years cover more record types in BaseProviderLiveTest
  • about 7 years add GCE shortcuts to supply A or CNAME record data from instance metadata
  • about 7 years allow zone format syntax in CLI
  • over 7 years publish maven snapshots and releases publicly
  • over 7 years Error handling - expected exceptions from cardinality violations
  • over 7 years allow provider-specific args in the cli
  • over 7 years analyze existing record data in netflix zones
  • over 7 years backends advertise RR types they support
denominator open pull requests (View All Pulls)
  • Add provider for Verisign's managed DNS service
  • Support hyphens in domain names in "example-daemon", and handle dynect token expiration
denominator questions on Stackoverflow (View All Questions)
  • Output fraction as numerator over denominator in java?
  • (SOLVED) Regular expressions (denominator of a fraction)
  • Is there any way to access denominator of a fraction in Python 2
  • Round fixed-point rational to narrower denominator
  • I get NaN with a divison function with a variable in denominator
  • If I have a numerator and denominator as two variables, how can I know if they form an integer?
  • Javascript rationals - preserving denominator of 1
  • SSRS Report Builder 3.0 Sum multiple Scopes in denominator
  • A division program the enters numerator twice and doesn't enter the denominator
  • Calculating Running Avg for YTD Sum with constant denominator for a year
  • Find the origin of "Ratio has zero denominator" Exception
  • SSAS - Need to have a calculated member that uses as a denominator one particular dimension value
  • Durand-Kerner with derivative in denominator
  • Which is correct to ignore dividing/logarithm of zero number in denominator
  • Is there a name for "denominator minus one" part in division with rounding up?
  • How to make Ruby 2.2 Rational#to_s show only numerator when denominator is 1
  • How to perform division of BigIntegers with bigger denominator than numerator and exponentiating it to 1/x where x is also biginteger
  • How should a kill:death ratio with 0 as the denominator be handled?
  • Combining two queries to get numerator, denominator, and grouping
  • Perform division calculation in R on a loop using varying denominator
  • Wrong Denominator in Proportion of multiple factors using svyby svyciprop
  • EXC_ARITHMETIC Error With Nonzero Denominator - XCode
  • var, sd, cor functions that have n as denominator
  • Rational number denominator
  • BizTalk: How to split an incoming message based on child nodes with a common denominator
  • Weak Math Skillset: What is an 8-bit numerator and 8-bit denominator?
  • No instance for (Fractional ((Numerator, Denominator) -> Fraction a0 b0))
  • Implementing rational numbers in c++ / numerator bigger than the denominator
  • matlab PID controller, SISO tools gives a "pid" with s^2 in the denominator
  • Treating NAs as 0 in denominator of fraction but not numerator
denominator list of languages used
Other projects in Java