how does netflix disable playing videos in multipl...
# general
m
how does netflix disable playing videos in multiple device at once or even spotify as well Anyone has an idea on this. Can you guys share the insights
t
A form of a lock table or TTL created with Device metadata
m
Do you have any reference or articles or architecture that can be followed
I am actually trying to work on it but is too confused to start on work on it atm
t
A locktable would just be a DB with a lock where the column name would be the device metadata tag (this could be IP-REGION-WIFI_NAME etc etc - anything that can be determined from the request metadata) For a request TTL/token, the first call to the Netflix server could create a token linked to the device metadata, and every subsequent request to the stream must have that token Different device = different token Could join the two
Just thoughts from the top of my head
m
What if i am playing from multiple browser
t
I am sure it is more sophisticated than that But I would assume its related to device metadata linked to request metadata
m
I mean multiple tabs
Still there is a blcoker from netflix saying video is being played in anohter tab or such
t
Each tab would have a different init token Tie that token into your lock table, and only one can be active at a time
m
Hmm
Can you share an arch based on your top general idea
I like this
Still exploring but damn its hard to find
t
Assuming netflix • Init stream request from Device creates a SessionToken • This Token is linked to a SessionTag which contains device/user/session metadata • A locktable is created which links that token to the metadata and is set to locked with a TTL on session init • On every subsequent (or new) request, the token must be present in the request, and the device/user/session metadata must match what is in the table • Should it not match, the request is rejected and the stream is dropped
Again this is just napkin stuff so many flaws