Google Domains SRV Records
SRV nonsense
While trying to figure this out I’ve gotten familiar with exactly what SRV records are. To be honest they’re pretty neat and convenient. SRV records basically tell an application what port and address to look at when connecting to a specific domain/subdomain. Unfortunately there are a few caveats
- The application implements SRV behavior, not the Network. Meaning you cannot expect this to work with an arbitrary application or even port-address combination. Minecraft specifically looks for SRV records. Google Chrome, for example, does not. Meaning webservers couldn’t take advantage of this.
- Technically speaking “Applications” are defined by IANA on a first come first serve basis. Meaning it needs to be registered* or another application can come along and take it
- I say technically because it’s not actually true. Minecraft, Matrix, Mumble, etc. all have the ability to listen to their respective
_application
records and in no way are registered with IANA. - Since this is implemented on the application side and the “application” is just apart of the query (and the DNS server makes no attempt to validate if it’s a registered app) you can theoretically implement this however you see fit
- Personally I have no idea why it needs to be attached to an “application”. It’d be great if you could actually use this for load scattering (different from balancing) HTTP(s)/web traffic through this method
- I say technically because it’s not actually true. Minecraft, Matrix, Mumble, etc. all have the ability to listen to their respective
Google’s implementation is wonky
While messing around with managing Minecraft servers I’ve discovered that the google documentation on SRV records to be rather abysmal.
Essentially all they do is copy-paste the wikipedia page, with no actual information related to how google does things, (Which is specific to google!)
Now, by itself this is perfectly fine, but the problem lies in that this is absolutely, completely and totally dead wrong for how to do it with google domains.
This took me a long time to figure out, ironically Microsoft’s Documentation on google services is better than their own documentation Each record should look like
Notice:
- You do not put the full domain in the first dialog box. If you only put the subdomain there. Otherwise it will accept it, but the record will not be registered.
- If you want to do it for the TLD don’t put anything there
- There is no dot at the end of the first dialog box! It won’t even let you put one there. Instead it’ll just strip it out
- The “address” isn’t an IP, it’s an actual domain/subdomain
Those first two things annoyed me to no end when I was attempting to get this working for two different Minecraft servers, running on the same machine.