One record pointing to multiple IPs


I saw a post on a forum today, stating that mc.demo.test points to server1, server2, server3, and connects the client, randomly, to one of them.
If they wanted to, they could remove any server, so the record no longer points to it, but still points to server1 and server2 for example.

The thread:

Please let me know how this is done.

You could just create three entries in your DNS:

mc.demo.test CNAME server1.demo.test
mc.demo.test CNAME server2.demo.test
mc.demo.test CNAME server3.demo.test

Alternatively, Minecraft uses SRV records so you could use that if you want to set priorities etc. If you’re unfamiliar with SRV records the first option is easier if you just want random allocation.

Would you be able to explain that a little further to me?
I’m not that experienced, allthough I’m still learning.

Are you sure that won’t cause glitches?

Most of our machines run on the default port (25565).

If you have three different definitions users will kind of get them one of them at random. So given a big enough userbase you should get a split across the servers just form that.

SRV records allow you to give weights etc if you want to prefer one server over the others (if, say, one had much more power).

Whether this causes issues or not depends on the application (whether client sessions ‘stick’ to the first host it is provided) and to be honest I don’t know enough about Minecraft to be able to say definitively.

Does it prioritise it by the IP address’s number?

No. If you use multiple records then it’s pretty much random (well, round robin). If you use SRV then you decide the priority etc when you define it. There’s no preference given the the actual IP addresses themselves unless you do it via the SRV definition.

Alright. Thank you very much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.