LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Achieving the lowest latency possible (https://www.linuxquestions.org/questions/linux-networking-3/achieving-the-lowest-latency-possible-786200/)

jaredscott 02-01-2010 08:17 AM

Achieving the lowest latency possible
 
Hi guys

I have been doing alot of research on the subject of lowering latency and I hope to offer a free service to lower the ping of MMORPG gamers, which my guild and I will also use... Its just a personal project and I have a software developer that will assist me with the software

I have played around with SSH tunneling and placed VPS (virtual private servers in strategically placed data-centers around the world. I found that this gives about 250ms improvement in some cases due to ISP's placing a higher priority on SSH. But since I currently live in South Africa and there is a large distance between Europe and America, we still suffer from about 520ms to 550ms latency due to pure physics (distance, etc)

Obviously having an unshaped line would improve the latency but I want to provide a service that does not depend on that (its expensive here)

My question is:

"Presuming that there is no signal related problems and the line is clean, how could I further reduce the latency of gaming traffic?" I thought of tunneling SSH over DNS since DNS has a very high priority at ISP's...

Your assistance would be greatly appreciated :-)

kbp 02-01-2010 07:11 PM

I can't think of any way that would make a decent dent without large sums of money... but have you thought about building/using/funding game servers in SA ? ..

jaredscott 02-02-2010 01:31 AM

Hi there, thanks for the response

Unfortunately most MMO's are hosted overseas (e.g. Blizzard for World of Warcraft) and its actually illegal to create "private servers" for the local community. I have played on a few local ones but since its not maintained and updated like the official servers, alot of stuff doesnt work and its a pretty poor gaming experience

Basically, all I want is to host a server in the same datacenters as Blizzard/NCsoft/other major companies (there are about 16 locations but I have funding) and then completely avoid any traffic shaping/QOS/etc on the gaming traffic from any ISP's starting from their computer here and ending up inside the physical datacenter (where some of the servers are located)

Like I said, a SSH tunnel from their PC (in SA) to the hosted server (in the datacenter) allows the gaming traffic (which is pushed through the tunnel) to suffer much less latency...

Please can you suggest any other ways that I can improve this (even if its by like 50ms, etc) Has anyone played with DNS tunneling or SSH over HTTP?

Thanks a mil, really appreciate your time!

jaredscott 02-02-2010 01:37 AM

Just a little more information:

I have verified that using SSH tunneling on an unshaped line results in about a 100ms difference in latency (vs using SSH tunneling on a shaped line) This is what i want to eliminate... Whether it be by using creative DNS tunneling or SSH over HTTP or anything, how can you avoid this shaping? (only for gaming traffic which is minimal, 10MB per hour)

Additionally, can anyone comment on adjusting the overhead of SSH to slightly improve the latency?

Thanks :-)

kbp 02-02-2010 03:27 PM

I don't play WoW, but a quick search seems to indicate that it only uses tcp ports for game play. Maybe a possible solution might look like this:

[client]-tcp-[proxy]-------udp---------[proxy]-tcp-[game server]

It'd be worth comparing the latency of dns tunnelling against a straight udp connection between the proxies, the non-tunnelled connection may be quicker due to the proxies having to process an extra protocol layer. You can probably use udp/53 fairly safely as I doubt any ISP's would be running protocol inspection for dns traffic, the load would be pretty high.

Looks like you have a bit of work ahead of you....

good luck

jaredscott 02-03-2010 02:33 AM

Excellent, thanks for that informative post :-)

Just to clarify, this is what i think should happen:

1. Dev a application to push all the TCP MMO related traffic through a local proxy (built into the app)
2. This application (on the local machine) will push the traffic using UDP (connectionless hence faster) over port 53 (DNS) directly to my server sitting in X datacenter, which will receive the UDP traffic and then forward it to the necessary TCP ports on the gaming server

I will have to test whether ISP's in general (I imagine this traffic has to pass through a number of them) have a very high priority to DNS...

I thinking about it last night, if I did decide to push the SSH tunnel over DNS, wouldnt that raise bigger alarms at the ISP's because that is not a standard practice? I also need to look at the practicality of this project, I imagine that creating this TCP -> UDP ----> UDP -> TCP could be alot harder... How much do you think it would improve the latency?

Personally, I think it could be huge considering that the TCP acks/etc will be local (game -> local proxy) and MMOserver -> myServer)

Any other thoughts or potential problems?

kbp 02-03-2010 06:39 AM

Not sure why you need an ssh connection... ?

I think the latency reduction could be good, the difference should be even greater over longer distances ( international ) compared to tcp... the majority of online/network games use udp in any case

The only potential problem I can see is that you spend a large amount of time and end up with not much improvement, probably best if you can put something together without investing too much time i.e do a proof of concept

cheers

jaredscott 02-04-2010 01:54 AM

I need an encrypted tunnel due to security reasons (i.e: Users log into their game accounts)

I have an idea but when it comes to this part of networking I am a bit rusty...

Software on the [ClientMachine] sends the [TCP Game Traffic] to the [LocalProxy] which then changes the traffic to [UDP] and encrypts it with a few XOR passes and RSA-1024.

It then pushes this local [UDP Encrypted] traffic over [DNS], though a couple ISP's (hopefully circumventing their traffic shapers due to it being an encrypted protocol and tunneling over DNS) and arrives at my VPS in London (or wherever the datacenter with the game servers are located) in [UDP] format.

The proxy (or whatever) on my VPS accepts the [UDP] traffic and decrypts it. Then it forwards it to the gaming server (which is in the same datacenter or very close) using [TCP], gets the response and travels back to the VPS... And the entire cycle continues but in reverse

First of all would this work to to circumvent ISP shapers for better latency and still be secure? Secondly, would this be drastically different (about 100ms difference is good) then simply setting up a VPS abroad, using putty to create a dynamically forwarded socks tunnel on a specific port and then pushing all the gaming traffic through it?

Quote:

Originally Posted by kbp (Post 3850684)
The only potential problem I can see is that you spend a large amount of time and end up with not much improvement

My concerns exactly... :P

I dont mind about the difficulty or time this project will take, I am just trying to find a way to get the very LOWEST latency possible using any technique or trick (and not using an unshaped line)

Thanks for reading this, looking forward to your comments... :-)

kbp 02-04-2010 03:32 PM

You would need to understand how the game handles it's encryption.. (maybe built in certs for ssl/tls?) .. before you even start the design of your app. Also, the more you 'manipulate' the data the slower it will go.. encryption will definitely have an overhead, but if the data is already encrypted then you don't need to worry.


All times are GMT -5. The time now is 06:25 AM.