Local cache for LAN parties

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Local cache for LAN parties

Postby lynx_nz » 01 Nov 2018, 01:03

I've run a few LAN parties where downloading updates from the FAF servers can take a while. This is no fault of the FAF servers, just i'll have up to 10 people hitting the same mod and we all sit there watching progress bars as it downloads.

solution :modify the steamcache container image to also cache downloads for FAF
added benefit : takes load off the faf servers :mrgreen:

If you want to give it a go, all you need to do;
(you'll need a bit of experience with docker / containers)

  • download and run steamcache/steamcache container. This is effectively a reverse proxy running nginx. You can download the image form here https://hub.docker.com/r/steamcache/steamcache/
  • modify /etc/nginx/sites-available/steamcache.conf file in the container. Add the following directly below the existing "location /depot/" entry (for steam) to cache all /faf/ URI requests;

    Code: Select all
    location /faf/ {
                    try_files $uri @mirror;
                    access_log /data/logs/access.log steamcache-local;
            }

  • redirect local DNS queries for content.faforever.com to your local server (above). I entered a host entry on my local DNS (pfsense : resolver service)
  • profit

There is a built-in script /scripts/watchlog.sh that displays access.log and highlights in green any cache HITS
(why i've left logging classified as "steamcache-local")

optionally you can use some of their other container images if you want to cache other gaming services i.e ;

https://hub.docker.com/r/steamcache/steamcache-dns/ - as DNS service to direct queries locally
https://hub.docker.com/r/steamcache/sniproxy/ - to forward though any https queries that cache cannot handle
User avatar
lynx_nz
 
Posts: 4
Joined: 25 Aug 2015, 05:46
Has liked: 7 times
Been liked: 0 time
FAF User Name: lynx_nz

Re: Local cache for LAN parties

Postby PhilipJFry » 01 Nov 2018, 01:07

oooor you just copy the faf patches from C:\ProgramData\FAForever\ from one pc to another (and do the same with mods from the mod folder if you have lots of big mods)
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: Local cache for LAN parties

Postby Deribus » 01 Nov 2018, 08:53

That's awesome Lynx! I can definitely see how this would be useful. Now to find some friends...
Deribus
Avatar-of-War
 
Posts: 84
Joined: 11 Apr 2017, 20:46
Has liked: 19 times
Been liked: 8 times
FAF User Name: Deribus

Re: Local cache for LAN parties

Postby Uveso » 01 Nov 2018, 17:01

To copy data from my host to all client PC's i use a simple .bat file.

Example:
Code: Select all
Set sourcedir="\\PCNETNAME\Supreme Commander Forged Alliance\Maps"
Set destinationdir="C:\Users\YOURNAME\Documents\My Games\Gas Powered Games\Supreme Commander Forged Alliance\Maps\"
RD %destinationdir% /S /Q
xcopy /s %sourcedir% %destinationdir%


Set = setting a value to a variable
RD= Remove directory
xcopy /s = copy with subdirectories
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest