tunapanda / provision

System for provisioning a new virtual machine with Tunapanda Edubuntu
7 stars 12 forks source link

Cache frequently accessed videos in NAND or SD storage #44

Closed usernamenumber closed 9 years ago

usernamenumber commented 9 years ago

Interesting suggestion from a Tunapanda email thread:

  1. Store video content by default in, say, /usr/local/tunapanda/videos/... (which is the SATA/USB storage, if present).
  2. Then, have a cron script (there's probably a better way, but we can go with this for now) that parses nginx's logs to see which videos are being accessed most frequently.
  3. Move the most frequently accessed videos to a directory in SD or NAND storage (I assume NAND will be the fastest, but space will be more limited)
  4. Use nginx's try_files directive to use the fast-storage version if it exists, disk otherwise.

Possible arguments against this:

usernamenumber commented 9 years ago

After running some tests, it looks like nand and SD are both actually much slower for large files. Closing this CR.