Logic behind the server list ping?

Post Reply
Whiskey
Member
Posts: 12
Joined: Sat Sep 01, 2018 19:42
GitHub: git512
In-game: Whiskey SNICKLE011

Logic behind the server list ping?

by Whiskey » Post

Ping is the round trip time between two nodes on a network. This will always be different if either node is changed. So why are we having the server list machine (located in the Netherlands according to the whois data on the server list ip) be the sole arbiter of what a server's ping is? This gives inaccurate results for players who will see the server list machine's ping to a given server and not what their ping is to the same server. This is further worsened by the fact that ping seems to be displayed in the minetest client as a "connection reliability" type of icon. I show only "two bars" to a server that I know for a fact I have less than a 10ms ping and <0.0000000015% packet loss to.

Almost all (real time) games that I know of ping the servers from the client to see what that ping really is since it makes a very large difference in playability of many games. This is a process that has to be done client side to make any sense in doing it at all.

Why was this method of determining ping chosen? The ranking points that this would affect could be easily calculated client side to give an accurate reflection of that clients rtt to each server and also clients would see what servers would have better connections for them.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Logic behind the server list ping?

by sorcerykid » Post

I agree, and this has been an ongoing concern. Last year I cited an example of how ping is an unreliable measurement for server ranking.

viewtopic.php?p=285901#p285901

There was a pull request to address the issue, but evidently it didn't go anywhere since nobody could agree what indicator to use.

https://github.com/minetest/minetest/pull/6504

Whiskey
Member
Posts: 12
Joined: Sat Sep 01, 2018 19:42
GitHub: git512
In-game: Whiskey SNICKLE011

Re: Logic behind the server list ping?

by Whiskey » Post

Ping can be useful as a metric. But only if it is calculated from that particular machine's perspective. This implementation is like google maps always giving directions and travel time from their own headquarters. Nobody cares about ping from the serverlist server to a gameserver unless they are playing locally on that server list server.

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Logic behind the server list ping?

by sorcerykid » Post

There are some 200+ listed servers. Pinging all of them is probably not the best approach either esp. since it would divulge the IP address of the client to every single server, which might be a security concern.

Whiskey
Member
Posts: 12
Joined: Sat Sep 01, 2018 19:42
GitHub: git512
In-game: Whiskey SNICKLE011

Re: Logic behind the server list ping?

by Whiskey » Post

Not a security concern. I do industrial network security professionally and am well versed in the sorry state of network security around the world. Internet wide scans already happen regularly. And I do mean EVERY IP on the internet. Shodan is one example. The data is publicly available. The linux program massscan is able to scan the entire internet in 6 minutes on a high bandwidth connection. Security through obscurity is not a viable option. Ever. Also the minetest client does not listen for connections, it only establishes them. So it's not broadcasting an attack vector. If the client does happen to have other services on that IP, that is already public and should have already been secured. The client pinging minetest servers doesn't present any additional security risk.

As to the factor of delay, I can send out and get back 200 pings to google.com in ~5 seconds doing it sequentially, waiting for a response before sending out the next. To your MT server it's ~10 sec for 200 sequentially and ~2.8s if I don't wait for a response before sending another, with an average ping of 52.83ms from here on the east coast of the US. Tested as I'm writing this. This is how 99% of online games determine ping even if they don't use actual icmp packets for their "ping". If ping is to be used as a metric it literally has to be this way. If it's not direct client to server it has no meaning. The lowest ping servers for that client will return the icmp packet the quickest anyway so they would be the first to populate. This has the added benefit of moving geographically closer servers closer to the top for a client which aids in having players who can understand each other's language.

Some method if limiting ping rate to a server would probably be useful but the same could be said for the minetest server service if it is not already in place. Otherwise DOS attacks are a possibility. Even with such they still are. If the attacker has a bigger pipe than your connection does, you're just screwed. This is why DDOS attacks are so hard to stop. This is probably best done at the firewall anyway. That's how rate limiting is generally done in the enterprise world at least.

User avatar
Linuxdirk
Member
Posts: 3218
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Logic behind the server list ping?

by Linuxdirk » Post

Whiskey wrote:Ping can be useful as a metric. But only if it is calculated from that particular machine's perspective.
Yes, exactly this. No-one cares about the latency between A and B when trying to connect to A from C.

But that’s not the only thing wrong with the server list.

Servers get lower rating when mobile players connect to them
There’s a massive memory leak no-one cares about since 2016
Arbitrary up- and downranking based on connected clients and run time
Configuration allows a list of banned IPs and servers and no-one knows what’s set on the master server

… just to name some.

Whiskey
Member
Posts: 12
Joined: Sat Sep 01, 2018 19:42
GitHub: git512
In-game: Whiskey SNICKLE011

Re: Logic behind the server list ping?

by Whiskey » Post

Linuxdirk: I was aware of the first of those and have post in the problems forum asking if there was a way to change all nodes in world referencing a specific player since one of my moderators fits the regex for a "mobile player" along with a discussion on github for the same issue that seemed to go nowhere in convincing them that many usernames of many systems fit that regex.

To be honest the server rankings seem extremely arbitrary. Then again seeing a server with half a dozen active players ranked under 50 (or many more) other servers that are totally empty makes no sense to me. sorcerykid has a screenshot of his server with 45 players playing on it at the bottom of the list. Minetest is supposed to be many different game types. Some of those are specifically mobile user friendly. Some aren't. This is the epitome of judging a book by it's cover.

The algorithm as reported on github deranks server with more than 16 players. Who knows why. But a few select servers are practically always at the top. With the stated reason of said algorithm being to give exposure to more good servers. These at the top, I agree, are well established servers but why are completely empty (now and on average) servers above those with active players on them?

And yes ping from the serverlist machine is 100% useless. That should never have even been considered valid data for a player to have the list changed by. If we could have the list provide points for certain things like server age and even # of players and then final adjustments could be made depending on the client's ping to that server. Otherwise rankings are skewed towards servers in close proximity to the serverlist machine.

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: Logic behind the server list ping?

by sfan5 » Post

Whiskey wrote:Ping can be useful as a metric. But only if it is calculated from that particular machine's perspective.
The server lists ping wasn't originally meant to be used for display purposes in the Minetest.
Someone wanted to add ping indicators and it happened to be exposed in the JSON, so they went ahead and the team of coredevs approved and merged this (uh oh).
1) More like no one cares about closing since 2016, I haven't seen it leak any memory in the last half year.
2) It seems to be easy for you to call an algorithm that has worked just fine for 3 years "arbitrary". Surely you have already sent a PR with a better algorithm, oh wait...
Whiskey wrote:Otherwise rankings are skewed towards servers in close proximity to the serverlist machine.
If you take a look at the code as linked by Linuxdirk, you will see that ping is not used except in cases of very high ping. Your servers' ranking will be identical whether you have a 0ms or 400ms ping.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: Logic behind the server list ping?

by sfan5 » Post

Also, instead of complaining here how the list ranking is "useless" or "arbitrary", I suggest you make concrete suggestions on how to improve it (e.g. "Just sort by player count and forget anything else"), write these down in a Github issue and work towards getting coredevs' opinions on them so these changes can actually happen.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Linuxdirk
Member
Posts: 3218
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Logic behind the server list ping?

by Linuxdirk » Post

You know that those suggestions were made in several places. Repeating the obvious (remove ping from display or have the client ping the servers instead the server list server pinging them, or simply sort by player count instead of arbitrary rankings) won’t help anyone here. The fact that it is still like it is after all the years just shows that no-one is willing to actually change it.

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

[solution] Logic behind the server list ping?

by Festus1965 » Post

may be this, Solution: for now
Minetest-ping-sort
doyousketch2 wrote:Spend a minute to find the server nearest you, for the fastest gaming response.

sudo apt-get install fping
./pingmt.py
I tested it, and perfect. Just may need to create a "copy" of that server-list to load, but if you just check your favorite servers as of there real ping from YOUR location, then you might change to a more nearby server.
And don't think as of one server in a country has low ping, the others might be same.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests