Skip to content

back off bulk metadata when API fails#79

Open
alexanderadam wants to merge 1 commit into
philippe44:masterfrom
alexanderadam:fix/metadata_retry_backoff
Open

back off bulk metadata when API fails#79
alexanderadam wants to merge 1 commit into
philippe44:masterfrom
alexanderadam:fix/metadata_retry_backoff

Conversation

@alexanderadam
Copy link
Copy Markdown
Contributor

getMetadataFor runs on every UI poll. for each uncached track in the playlist we collected ids and called the data api. when the call failed (bad key, quota, private video, network blip, whatever) nothing was cached, so the next poll did the same thing again. a long playlist turns this into a request storm that drags the whole server down.

cache a tiny fail marker per id. 5 min for hard errors, 1 day for ids the api never returns (most likely deleted or private). next poll skips them so we stop hammering.

getMetadataFor runs on every UI poll. for each uncached track in
the playlist we collected ids and called the data api. when the
call failed (bad key, quota, private video, network blip, whatever)
nothing was cached, so the next poll did the same thing again. a
long playlist turns this into a request storm that drags the whole
server down.

cache a tiny fail marker per id. 5 min for hard errors, 1 day for
ids the api never returns (most likely deleted or private). next
poll skips them so we stop hammering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant