With the 0.8.0 release FiFo’s ecosystem will grow with the addition of a dynamic DNS service. The functionality is rather simple, and makes it possible to assign each interface a hostname. When queried this hostname will return the IP of the interface. It is also possible to give multiple interfaces (on different machines) the same hostname, effectively creating a DNS round robin where all available DNS records get returned.
A simple example where this functionality can be used is a multi-node FiFo installation. Each zone running Howl (the API endpoint) gets the hostname ‘fifo’. From that point forward, fifo.<org uuid>.vms.cloud.fifo will resolve to all of those IP’s, which provides a simple load balancing, and to a certain degree fault tolerance.
An great use for this feature is decoupling VM creation order when using connected systems. Hostnames can be resolved in random order and a zone does not have to fully exist for another zone to be aware of it. Conceptually, think database and app server, the app server can be configured with db.<org uuid>.vms.cloud.fifo and created even if the exact IP is not yet known, more database servers can easily be added without the app server zone ever needing to know about it.
Technical details of the DNS implementation
On a more technical note, the resolution will work like this. Each DNS name is constructed from 4 parts:
4 | 3 | 2 | 1 |
<hostname> | <org uuid> | vms | cloud.fifo |
<vm uuid> | <org uuid> | vms-uuid | cloud.fifo |
- The ‘top-level domain’ it defaults to cloud.fifo as this is guaranteed not to conflict with real domains.
- The type of query, vms will look up VM hostnames, vms-uuid will look up a UUID.
- The UUID of the organization owning the VM, this prevents overlap between different organisations.
- The item to look up, hostname for a vms query and the UUID for the vms-uuid query
With this structure it gets possible to use a full DNS server to re-map the domain to something more user-friendly, for example: cloud.project-fifo.net could map to <org uuid>.vms.cloud.fifo on the FiFo DNS server.
The installation is simple, we provide a package ‘fifo–dns‘ that includes the server, usually no configuration is required.
Leave a Reply