View Single Post
MegaBrutal
Junior Member
Join Date: Sep 2021
Location: Hungary
Old 02-11-2023 , 19:45   Re: Fast Download problems
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
This game [engine] was created 25 years ago . . . It hasn't had any major updates for a very long time.
True, but someone on this forum mentioned that HL supports IPv6 for Fast Download and so I had that expectation. Also at one point I did implement IPv6 support for my application which originally only supported IPv4, so I know it doesn't take much to convert a software to be IP version agnostic. Agreed it might take a little more with such a complicated software like HL, but still somehow I thought they got around to do it. Wonder if Source supports IPv6.


Quote:
Originally Posted by fysiks View Post
Your server files and your fast download web server should be entirely and completely separate. Only put files on the web server that you want to have available publicly. Only map and plugin resource files that are going to be downloaded by the client should be on your web server.
Why though? It made lots of sense in the old days for performance concerns, but now we have multicore servers with blazingly fast SSDs and gigabit upload speeds. Since HLDS is single-threaded (as far as I know), it may only claim 1 core at maximum. So I don't see any bottleneck here, I think one server may host HLDS and the Fast Download webserver just fine.


Quote:
Originally Posted by fysiks View Post
It falls back to direct download from the server. This is why you should make sure that your fast download web server is reliable.
It wouldn't be that much of a problem if HL wouldn't give up on using FastDL altogether... But overall it's still better than if it would prevent people from connecting at all.


Quote:
Originally Posted by fysiks View Post
Maybe you already found it but you can enable developer mode with "developer 1" in console. This gives you much more info about what's going on in the background that you don't normally need when things are working correctly.
Yeah, I actually set "developer 5" to ensure I see everything. I think 3 is the highest setting that actually makes sense, but I wasn't sure, so I set a number that surely includes everything.


Quote:
Originally Posted by gabuch2 View Post
I have no idea how to do it with Nginx but with Apache you can restrict certain filetypes from downloading.
Yeah, I generally prefer Apache because I know it much better, that's what I've spent most of my life with. Yet I chose nginx for this purpose because it's known to be more lightweight. Anyway, here's how I blocked certain file extensions with nginx (it goes into the "server" tag within "http"):

Code:
        location ~\.(cfg|log|ini|so|dll)$ {
	    deny all;
        }
If I've known about an even more lightweight and performant webserver, I'd use that, especially if it's written in Rust. I was thinking that it would be possible to implement a webserver using existing libraries that would be aware of HLDS and cache the files needed for the next map in advance so it could serve them faster. But I'm not sure if it would improve anything, as file access is not the bottleneck here, and the OS already implements its own file system cache anyway.
MegaBrutal is offline