[MC-137] Ping packet doesn't include host information Created: 24/Oct/12 Updated: 03/May/15 Resolved: 27/Jun/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.1, Minecraft 1.4.2 |
| Fix Version/s: | Minecraft 1.6 |
| Type: | Bug | ||
| Reporter: | Chris Lloyd | Assignee: | [Mojang] Grum (Erik Broes) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | multiplayer | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Confirmation Status: | Unconfirmed | ||||||||
| Description |
|
The ping packet used to populate the server browser doesn't include the host it is trying to connect to. This doesn't match the rest of protocol. The host information is included in other packets and enables services (like Minefold) to host Minecraft in cloud environments. Because of the lack of host information in the ping packet virtually hosted servers appear not to have any players when the appear in the server list "???". (Add minebnb.chrislloyd.minefold.com for an example) as there isn't any way of knowing which server the ping is intended for. |
| Comments |
| Comment by Chris Lloyd [ 29/Oct/12 ] |
|
Great to hear from you Nathan. However, I'm really disappointed that this is intentional and I strongly disagree with your reasoning. Firstly, let me outline some misconceptions you have. I'll then go onto explain some of the history, alternatives & benefits to virtual-hosting.
Your worry that a server can't respond to a TCP request with a practical maximum of 300 bytes in 3s seem to be based on intuition rather than reason. You mention that SRV based hosting is a viable option. We bring up servers dynamically: when nobody is playing the process isn't running. Even if the TTL was set very low, and every ISP honoured low TTLs, we just can't do this with DNS. We would have to start a server on every DNS lookup which would be very inefficient. We also dynamically adjust servers (either to move the processes around or at least hold the connection) and bill customers based on their connection to their connection to them. SRV records dictate what sort of infrastructure we should be running. It's good for traditional hosts (like Gameservers). Virtual-hosts lets us be free to experiment with more cutting-edge architectures. EDIT: Removed misunderstanding about SRV records and slight troll. The entire http internet is based on virtual hosting. It's a proven concept. Websites all around the world have proven reliability and performance by allowing an intermediary to act as an endpoint to the user. In a cloud environment where we bring machines are being brought up and down dynamically, buffer connections as resources are allocated etc. a virtual-hosts based proxy is a must. In addition, the hostname and port are already included in the handshake request. It feels unusual to me that you should be so anti virtual-hosts based routing but still enable it elsewhere in the protocol. The only work needed to make this change is to add the hostname and port in the ping-request, and then ignore it in the server. I understand that it might not seem like a massive win for Minecraft but it's a simple change that would make the 65,000 players of Minefold very happy. Scienced! |
| Comment by [Mojang] Nathan Adams [ 29/Oct/12 ] |
|
This is intentional. I would recommend switching away from proxy servers for multiple routing and towards SRV based routing. The ping process is very fail-fast. It's an impatient system and times out after just 3 seconds (now; it used to be much smaller). To add the host into this, the process would look like:
From the client starting the request, to the client finishing processing the server's response, this must take no more than 3 seconds. |
| Comment by Chris Lloyd [ 25/Oct/12 ] |
|
Hi Bruce! I may not have been clear enough with the original bug report. I run Minefold and helped write most of the networking stack to run over 60,000 Minecraft servers. The server software is vanilla Minecraft. The bug is in the protocol (the language that the servers speak to clients with). Well, it's not really a bug, it's an inconsistency. The "???" is because we don't know what host the ping packet is trying to connect to and therefore can't offer back accurate player counts. |