Hacker News new | past | comments | ask | show | jobs | submit login

> return a random video for a certain percent of non existing identifiers.

if you got a video from a randomly generated ID, you can immediately query for it again, and see if the video was the same as before.

If it's not the same, you disgard the result and assume the ID generated was actually non-existent.

If it's the same, then you know it's a real ID.

As long as youtube vidoe URLs are immutable, this method will stop the blocks you described.




Unless they cache the false information…


but now you have to store state for some arbitrary url, share it across many different clusters/regions, record which IP has seen it etc...

a lot of work, for very little gain.


You could use a hashing function that guarantees the same result every time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: