Thank you, Valve

About twice a year I help set up and run a local LAN Party at a Rugby club on the outskirts of town. Compared to more widely known events, ours is tiny in comparison – typically 20-30 people – all squeezed into the club house.

20130615-DSC_0030

One thing that a LAN party needs to be a success, particularly in the last few years, is a solid connection to the internet so that multi-player server lists can be retrieved, DRM systems can unlock, updates can download, and people can sign into Steam. Guests might also wish to have more general net access for the web, email, IM etc. One of the issues with smaller venues, however, is that they generally have no need for a fast, reliable internet service – the cheapest consumer-grade connection will normally suffice. In some cases, the geography of the less expensive locations – required for small parties – tends to impose technical limits on what services are available anyway. In our case, the clubhouse has an ADSL connection which syncs at about 2Mbit on a good (dry) day.

2Mbit shared between 30 users doesn’t split very well. In fact, 2Mbit for a single user would be quite a trial these days. One of the biggest problems is the amount of traffic created by game updates, which are typically a few hundred megs per game. For multiplayer games – the centre of a LAN event – everyone needs to be on the same version of the game as the server. A far as I can remember, Valve (producer of the many popular Source-based games) has released updates for their games the day before every LAN party event we’ve had in the past few years. That typically leads to a significant number of installs being out of sync with everyone else.

Let’s assume that 50% of installs need to update out of a total of 30, and the update is 200MB big; over a 2Mbit connection, on the assumption the connection is completely unused by other activities, each of the 15 clients will have 133Kbit/s or 17KB/s – the update for each person will take approx 3 hours 15 mins to download. That’s just for updating one of many games. If someone wants to join in with a game they don’t own, they can purchase it on Steam but it’s very unlikely that it will have finished downloading by the time the event is over.

There’s a lot of duplication going on when downloading game updates. Everyone downloads exactly the same files, but until earlier this year it was impossible for people to ‘share’ those downloads. Steam is the most popular game distribution platform for PCs, and for the most of its life it used a proprietary download protocol running over very non-standard TCP & UDP ports. Much to the applause of us network admins, Valve has now changed this to use the SteamPipe system which is based entirely on HTTP. By itself, this doesn’t change very much, but with some tricks it is the breakthrough that should ease the pain of future parties.

With their huge (thousands of guests) i-series LAN events, Multiplay had the same problem as us but on a much larger scale. They were one of the first to take advantage of the new distribution platform, using a combination of DNS overrides and a custom HTTP proxy using Nginx. They very kindly published their approach.

Steam Cache Network

For the technique to work, there needs to be a DNS server which resolves queries for all of the machines that are to use the mechanism, and an HTTP proxy server that will store the received updates. Details aren’t specified on how to configure the DNS server, so it is assumed you already have one and just need to add the spoofing records to make sure SteamPipe traffic goes through the caching server.

If you find this method a little tricky, the same effect can be accomplished with a normal HTTP proxy server (lots of solutions out there for that) but the disadvantage of generic HTTP proxy servers is that they are designed to flush (clear) their caches to remove lesser-used or old content. Ideally we want to keep as much of the retrieved objects as we have space for, which Nginx allows us to do.

For our purposes, there is a slightly modified/enhanced version of Multiplay’s setup created by Astrolox. This one is designed for Ubuntu, which I’m more familiar with compared to FreeBSD. It also caches the general steam client content that can consume a lot of traffic, implements a per-user bandwidth limit and blocks the transmission of crash reports (which can be fairly large).

We may also be using a slightly different network structure to the one shown above. After a fair bit of looking, I’ve found a great router distribution – Endian Firewall – through which all requests are routed. This little gem contains transparent DNS proxying, which can be configured to redirect requests based on specific domains to another DNS server; in our case the requests for steampowered.com all go to our internal DNS server which spoofs addresses where necessary. It also includes transparent HTTP proxying, as well as the typical firewall and request filtering.

Lantastic Steam Cache Network

 

We are also looking at other options for connectivity, with satellite being our best bet so far – either by itself or combined with a landline-based service or 3/4G. For large downloads that don’t mind about latency, such as our game updates, satellite would be perfect. For now though, the cache of game updates should dramatically improve the quality of service at our LAN party events. In the update example given earlier, our 200MB download will now only need to happen once and will complete in 1/15th of the time at a little under 15 minutes.

 

This entry was posted in Gaming, Networking. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. blackesy
    Posted Sunday, 15th September, 2013 at 1:36 pm | Permalink

    which mmlan was that?

  2. Posted Sunday, 15th September, 2013 at 2:54 pm | Permalink

    15, the last one.

  3. mike
    Posted Tuesday, 31st December, 2013 at 5:47 pm | Permalink

    I did lan party with had dial up connection 3k/s lol had 8 people on that good ole days slow but fun

One Trackback

  1. By Thank you, Valve | Lantastic! on Monday, 21st April, 2014 at 3:18 pm

    […] Originally published on killswtch.net […]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">