mojira.dev
MC-255735

No Happy Eyeball and no Multi Homing support

When a Server (DNS Name) has multiple IPs (IPv4+IPv6 or multiple for better availability) Minecraft only tries connecting to the first IP returned by the DNS API call.

If that one IP is unavailable Minecraft will say that the server is down, even though it is available through other IPs.

It therefore also doesn't use the best (fastest responding) server.

 

Example:

"a.example.com" with:

  • 192.0. 2.146

  • 2001:db8:2::2

  • 2001:db8:1::2

When a user now tries to connect to this server Minecraft will only use the first IP the DNS client returned and ignore all others. And if 192.0.2.146 is unavailable or has degraded performance (because of a CGNAT on the user's side) connecting will fail and users will have a worse experience playing on the server.

 

The correct behavior is documented in RFC1123 (Section 2.3 Applications on Multihomed hosts) https://www.rfc-editor.org/rfc/rfc1123#page-14 and RFC8305 https://www.rfc-editor.org/rfc/rfc8305

 

Linked issues

Comments 1

Not a duplicate of MC-255720. This bug is still present in Minecraft 1.21.4.

For example, I have a Minecraft server with server name test.jivanpal.com, with SRV record resolving to theremin.jivan.dev:25561, and hostname theremin.jivan.dev being dual-stacked:

$ host test.jivanpal.com # No output, because domain name has no A or AAAA records

$ host -t SRV _minecraft._tcp.test.jivanpal.com
_minecraft._tcp.test.jivanpal.com has SRV record 0 1 25561 theremin.jivan.dev.

$ host theremin.jivan.dev
theremin.jivan.dev has address 109.74.195.249
theremin.jivan.dev has IPv6 address 2a02:6b6f:fc22:4c80:842f:42ff:fe4b:3c05

If connecting from a host with an IPv4 connection, using test.jivanpal.com as server address on the "Connect" screen works. If connecting from a host with only an IPv6 connection, it times out. Furthermore, a dual-stacked host will only ever connect using IPv4, even if connecting using IPv6 would offer lower latency.

The Happy Eyeballs spec/algorithm addresses these issues. Please implement it.

Since my ISP only provides IPv4 connectivity via CGNAT, this means that dual-stacked clients that connect to my server over IPv4 get a much worse experience (an additional 10ms to 30ms of latency, since I have to proxy them via a cloud service provider that I lease an IPv4 address from). Currently, such clients will always get that worse experience if I use a dual-stacked server name as above. To work around this, I have to use two separate server names (one for IPv4 and one for IPv6), and each needs to resolve to a distinct hostname (one for IPv4, and one for IPv6), e.g.

_minecraft._tcp._test-v6.jivanpal.com SRV  => v6.theremin.jivan.dev:25561
v6.theremin.jivan.dev => 2a02:6b6f:fc22:4c80:842f:42ff:fe4b:3c05

_minecraft._tcp.test-v4.jivanpal.com SRV => v4.theremin.jivan.dev:25561
v4.theremin.jivan.dev => 109.74.195.249

I then have to instruct users to use test-v6.jivanpal.com, and if that doesn't work (because the user happens to not have IPv6 internet connectivity or something just isn't working correctly at that point in time, e.g. a transient failure in the ISP's IPv6 networking), then they have to manually change this to test-v4.jivanpal.com. Ideally, this choice of protocol would instead be automatically handled by the Minecraft client application as per Happy Eyeballs.

Two years have passed since the original bug report was filed. Please at least acknowledge receipt of it.

agowa338

(Unassigned)

Confirmed

Platform

Normal

Networking

1.19.2, 1.21.4

Retrieved