This is the second try (original post: https://feddit.de/post/426890) of me trying to get an answer, this time I’ll be more specific of what I am thinking to do. I thought a more generalized question would be enough. Sorry for that.

A peertube server needs lots of storage. Many of the videos will hardly get any views. Storage space on a vps is pretty expensive, storage space in general isn’t cheap. So my thought was to

have a disk at home (maybe external disk on a raspberry pi) and a VPS.

The VPS only has a very limited amount of storage, but is otherwise totally able to run peertube well. So why not have a virtual file system on the VPS, which looks like it has the size of the HDD and it uses a specified amount of the vps storage for caching. So if someone watches a popular part of a popular video, the vps can serve the video content from the local disk. If someone wants to watch the video that nobody ever watches, it’s not a problem since the uplink from home can easily deliver that as well, without the video taking the precious storage. Block caching would be best, since file caching wouldn’t be ideal with video files being really big in some cases. So a very long video would fill the cache, even if only parts of it are needed.

The remote storage doesn’t need to be from home of course, could be cheap cloud storage. I know that peertube works with s3, but it will only move transcoded videos into a bucket and then serve them directly from there. I don’t want that from home, it would also not use the upload performance of the VPS for popular videos.

Any thoughts? Good idea or not?

I have worked with bcache in the past and was always very impressed with the performance, I think my scenario could really work.

  • holdengreen
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 years ago

    I was thinking bcache too. I want to see how to do this.

    personally I bought two multi year VPS deals from Hostens and Time4VPS. A Linux VPS and a 512GB storage VPS. You can use NFS and and get lots of free bandwidth because they are on the same LAN. storage vps is a OpenVZ6 (kernel 2.6.32) which sucks its old debian and no functioning cgroups or loop devices.

    RAM and CPU is still too expensive for me on the Linux VPS so that sucks. I want to see if I can find a service somewhere that will let me send them a Rock Pi 5 16GB with 1TB Netac NV3000 strapped on that and see if they will let me host it for cheaper than I’m paying hostens with decent bandwidth…

    unixsurplusnet (ebay) seems to have good deals on hard drives. I found out you can make server encasings from cheap aliexpress aluminum extrusions (wip).