Making Peertube Instance's Videos Faster to Load

I’m new at Peertube. I manage to get my instance up and running and using S3 storage. My VPS is located in Germany, using Wasabi (datastore in the Netherlands, I believe), and I’m currently accessing my instance from Taiwan. I noticed that it is a bit slow to load the videos. I guess that is due to the distance between me and the VPS and the VPS and the Wasabi storage.

I setup NGINX, per the instructions, so that video requests are routed directly to the Wasabi storage to save bandwidth, but it is kinda unreliable - sometimes the videos load and sometimes they don’t, giving me the message « The media cannot be loaded either because the server or network failed or because the format is not supported. » However, when I set it up the first time it worked perfectly. I’m not sure why it is not consistent.

Assuming I solve the problem above, I would like to know if I can setup a reverse proxy per the instructions AND continue to have the settings above which calls the video directly from Wasabi or it has to be one or the other.

Lastly, is there any advantage of having a service like Cloudfare?

Thank you.

hi @Dan,

If you followed PeerTube documentation, then yes, you can continue with the settings above.

Sorry. I don’t think I was clear enough.

I already completed the following: https://docs.joinpeertube.org/#/admin-remote-storage

It works for savings video to my Wasabi bucket. However, when I configure NGINX to allow requests to be sent directly to Wasabi (to save bandwidth), it works intermittently. Eventually, some of the videos will break and I will get the error in the playback window « The media cannot be loaded either because the server or network failed or because the format is not supported. »

The other question was: Can I use NGINX caching (https://docs.joinpeertube.org/maintain-configuration?id=leveraging-nginx-caching) with the above to get more performance?

Thank you so much. :slight_smile:

No ; serving via remote storage works by redirecting the requests, which is thus not served by the Nginx server (nor its cache!).

Are all your videos in the Wasabi bucket?

Thank you for your help.

Got it. I figured as much. I just wanted to be sure. :slight_smile:

Yes, all of them.

That’s weird :confused: Could you link to one of the videos suffering of that transient failure?

I tried to troubleshoot a bit and I found out that my bucket didn’t have the proper permissions.

Thank you for your help. Much appreciated. :smiley: