<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 11:49:59 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[MC-137] Ping packet doesn&apos;t include host information</title>
                <link>https://bugs.mojang.com/browse/MC-137</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;The ping packet used to populate the server browser doesn&apos;t include the host it is trying to connect to.&lt;/p&gt;

&lt;p&gt;This doesn&apos;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.&lt;/p&gt;

&lt;p&gt;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 &quot;???&quot;. (Add minebnb.chrislloyd.minefold.com for an example) as there isn&apos;t any way of knowing which server the ping is intended for.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11383">MC-137</key>
            <summary>Ping packet doesn&apos;t include host information</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="grum">[Mojang] Grum (Erik Broes)</assignee>
                                    <reporter username="chrislloyd">Chris Lloyd</reporter>
                        <labels>
                            <label>multiplayer</label>
                    </labels>
                <created>Wed, 24 Oct 2012 20:58:54 +0200</created>
                <updated>Sun, 3 May 2015 06:24:56 +0200</updated>
                            <resolved>Thu, 27 Jun 2013 07:05:47 +0200</resolved>
                                    <version>Minecraft 1.4.1</version>
                    <version>Minecraft 1.4.2</version>
                                    <fixVersion>Minecraft 1.6</fixVersion>
                                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="15125" author="chrislloyd" created="Mon, 29 Oct 2012 19:40:49 +0100"  >&lt;p&gt;Great to hear from you Nathan. However, I&apos;m really disappointed that this is intentional and I strongly disagree with your reasoning. Firstly, let me outline some misconceptions you have. I&apos;ll then go onto explain some of the history, alternatives &amp;amp; benefits to virtual-hosting.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://1.bp.blogspot.com/-RHz2SGBkfZ4/TlT87ZGy-kI/AAAAAAAAAcw/JJbDAbli7p8/s1600/doctorwhoooo.jpg&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;&quot;Strings ain&apos;t small&quot;. I scraped the first 10 pages of mcserverlist.net (&lt;a href=&quot;https://gist.github.com/3974966&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;script&lt;/a&gt;) and found that the average size of a hostname (including IP addresses and ports) is 17 characters. Assuming you want to encode them the typical Java way (1 byte length with UTF16 encoded chars) that would take on average 35 bytes. If you wanted to do the same but limit hostnames to ASCII characters (none of the servers in those top 10 pages had non-ASCII chars), it would only be 18 bytes. If you wanted to include the port that would be another 2 bytes.&lt;/li&gt;
	&lt;li&gt;&quot;Packets aren&apos;t usually nice and whole&quot;. For broadband connections on Windows, the default MTU is 1500 bytes. No (practical) network interface has a MTU of less than 1,200 bytes. Even with the existing magic byte, the ping response will practically never hit this limit and therefore be nice and whole.&lt;/li&gt;
	&lt;li&gt;Pt 3, &quot;Act normally&quot;. I&apos;d propose that the hostname is always sent and always ignored by the official MC Server. It only means something if you&apos;re running a proxy (like us).&lt;/li&gt;
	&lt;li&gt;&quot;Respond with the data ASAP&quot;. Our proxy keeps an in memory cache of player counts, it can respond &lt;em&gt;very&lt;/em&gt; quickly.&lt;/li&gt;
	&lt;li&gt;&quot;Quite some time has passed now&quot;.  If our proxy isn&apos;t able to respond in about 30ms then we&apos;ve failed.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Your worry that a server can&apos;t respond to a TCP request with a practical maximum of 300 bytes in 3s seem to be based on intuition rather than reason.&lt;/p&gt;

&lt;p&gt;You mention that SRV based hosting is a viable option. We bring up servers dynamically: when nobody is playing the process isn&apos;t running. Even if the TTL was set very low, and every ISP honoured low TTLs, we just can&apos;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&apos;s good for traditional hosts (like Gameservers). Virtual-hosts lets us be free to experiment with more cutting-edge architectures.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;EDIT:&lt;/b&gt; &lt;em&gt;Removed misunderstanding about SRV records and slight troll.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The entire &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http internet&lt;/a&gt; is based on virtual hosting. It&apos;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.&lt;/p&gt;

&lt;p&gt;In addition, the hostname and port are already included in the &lt;a href=&quot;http://www.wiki.vg/Protocol#Handshake_.280x02.29&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;handshake request&lt;/a&gt;. It feels unusual to me that you should be so anti virtual-hosts based routing but still enable it elsewhere in the protocol.&lt;/p&gt;

&lt;p&gt;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&apos;s a simple change that would make the 65,000 players of Minefold very happy.&lt;/p&gt;

&lt;p&gt;Scienced!&lt;/p&gt;</comment>
                            <comment id="15043" author="dinnerbone" created="Mon, 29 Oct 2012 16:01:18 +0100"  >&lt;p&gt;This is intentional. I would recommend switching away from proxy servers for multiple routing and towards SRV based routing.&lt;/p&gt;

&lt;p&gt;The ping process is very fail-fast. It&apos;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:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Send extra data (strings ain&apos;t small!)&lt;/li&gt;
	&lt;li&gt;On the server, try to read string. Spend up to a second waiting for string because packets aren&apos;t usually nice and whole.&lt;/li&gt;
	&lt;li&gt;If on the server we don&apos;t get a string by then, pretend they didn&apos;t have one and act normally. (For back compat)&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;If proxy&amp;#93;&lt;/span&gt; figure out what server they asked for and route all data to/from that&lt;/li&gt;
	&lt;li&gt;Respond with the data ASAP&lt;/li&gt;
	&lt;li&gt;Assuming the client is still listening, because quite some time has passed by now, the client will measure the trip time and display that as a lagometer.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;From the client starting the request, to the client finishing processing the server&apos;s response, this must take no more than 3 seconds. &lt;/p&gt;</comment>
                            <comment id="13740" author="chrislloyd" created="Fri, 26 Oct 2012 01:53:53 +0200"  >&lt;p&gt;Hi Bruce! I may not have been clear enough with the original bug report. I &lt;b&gt;run&lt;/b&gt; 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 &lt;b&gt;protocol&lt;/b&gt; (the language that the servers speak to clients with). Well, it&apos;s not really a bug, it&apos;s an inconsistency.&lt;/p&gt;

&lt;p&gt;The &quot;???&quot; is because we don&apos;t know what host the ping packet is trying to connect to and therefore can&apos;t offer back accurate player counts.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="36343">MC-18149</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="10681" name="Screen Shot 2012-10-24 at 11.58.11 AM.png" size="73727" author="chrislloyd" created="Wed, 24 Oct 2012 20:58:54 +0200"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0905r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>