Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Lancache support to the CDN Client. #1423

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tpill90
Copy link
Contributor

@tpill90 tpill90 commented Sep 4, 2024

Added automatic Lancache detection to the CDN client. If a Lancache is on the local network and the trigger domain is poisoned, then SteamKit will direct all traffic through the cache instead of Valve's CDNs.

This behavior should match what the current behavior in Steam is.

@Dimensional
Copy link

This has been sitting here for a while, but I realized something that needs to be taken into consideration is that if the LanCache has a bad file saved, like a file got corrupted in storage or network issues resulted in a 0-length file, this setup would constantly request the file over and over again, constantly getting the same bad file and delaying downloads.

This is a flaw even with Steam when it grabs from LanCache, and requires reviewing the access logs, identify the files being requested repeatedly, and then have to either locate the cached files and delete them, or do what steam-lancache-prefill does and append ?nocache=1 to the end of the url string in order to force LanCache to discard what it has saved and grab from upstream again.

@xPaw
Copy link
Member

xPaw commented Nov 10, 2024

I thought the method to detect lancache automatically was fine, by doing a look up. Just make it assign result into UseLancacheServer if available (and leave calling the method to consumers).

@tpill90
Copy link
Contributor Author

tpill90 commented Nov 14, 2024

I thought the method to detect lancache automatically was fine, by doing a look up. Just make it assign result into UseLancacheServer if available (and leave calling the method to consumers).

Put the lancache detection into a method for users to call, should match what you were expecting now.

@tpill90 tpill90 marked this pull request as ready for review November 15, 2024 16:17
@tpill90
Copy link
Contributor Author

tpill90 commented Nov 15, 2024

@xPaw Should I squash this branch prior to merging now that it's approved?

@xPaw
Copy link
Member

xPaw commented Nov 15, 2024

We can squash on merge. Did you test this pr with Depot downloader?

@tpill90
Copy link
Contributor Author

tpill90 commented Nov 15, 2024

Yep. Tested again just now with the -use-lancache flag I was adding to DD. Top pane is me running DD w\ the flag against this PR branch. Bottom pane is the access.log from Lancache showing that it is pulling from the cache.

image

@xPaw xPaw requested a review from yaakov-h November 15, 2024 18:48
@tpill90 tpill90 force-pushed the AddLancacheSupport branch from c4d3632 to 35ec1cd Compare December 5, 2024 20:47
@tpill90
Copy link
Contributor Author

tpill90 commented Dec 5, 2024

Fixed the latest comment, rebased, and pushed again.

@tpill90
Copy link
Contributor Author

tpill90 commented Dec 6, 2024

@yaakov-h You mind giving this a review when you have a moment? We should be good to merge at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants