perf(deploy): cache the YouTube artwork at the nginx edge
Thumbnail responses are immutable for a month, so nginx can answer repeats from disk and never wake the web player or Google for them. The cache lives in its own volume, collapses concurrent misses with a lock and serves stale copies while it refreshes; THUMBNAIL_CACHE_SIZE sizes it.
This commit is contained in:
@@ -60,6 +60,8 @@ AUTH_ALLOW_INSECURE_HTTP=false
|
||||
AUTH_REQUIRE_HTTPS=true
|
||||
# Largest request body nginx accepts (audio uploads go through the web player).
|
||||
MAX_UPLOAD_SIZE=1024m
|
||||
# Disk nginx gives to the cached YouTube artwork it serves for the web player.
|
||||
THUMBNAIL_CACHE_SIZE=2g
|
||||
# Extra yt-dlp flags for the Worker. The cookie jar avoids YouTube's bot checks;
|
||||
# drop it here if you do not have one: deploy/secrets/ is mounted at /secrets.
|
||||
YTDLP_ADDITIONAL_ARGUMENTS=--cookies /secrets/youtube_cookies.txt --extractor-retries 1 --socket-timeout 15 -N 4
|
||||
|
||||
Reference in New Issue
Block a user