this post was submitted on 21 Oct 2024
172 points (99.4% liked)

chapotraphouse

13538 readers
771 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Gossip posts go in c/gossip. Don't post low-hanging fruit here after it gets removed from c/gossip

founded 3 years ago
MODERATORS
172
submitted 3 weeks ago* (last edited 2 weeks ago) by [email protected] to c/[email protected]
 

Edit: Update 2024-10-30

Let it be known that Mr. Alexandru was very patient with me and resolved everything for me by upgrading his infrastructure a few days later. I really appreciate it!


blob-on-fire

TankieTube is suffering from success.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 31 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

The server has a 2 TB SSD and I devote exactly half of it to a nginx cache for the object storage. It caches for up to a year.

PeerTube doesn't support horizontal scaling so I don't think I can use a load balancer. I don't know much about using CDNs.

[โ€“] [email protected] 29 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Going by the server stats, that's 10% of the uploaded media, which should be pretty good I imagine (assuming a fraction of videos are popular and get a lot of requests while most videos don't get many views at all).

I guess another potential thing to look for is if people are deliberately trying to DOS the site. Not quite bringing it down, but draining resources. I could imagine some radlibs or NAFO dorks trying something like this if they caught wind of the place. Could also be caused by scrapers (a growing problem on the Fediverse and the Internet generally, driven by legions of tech bros trying to feed data to their bespoke AI models so they can be bought out by Andreesen-Horowitz).

[โ€“] [email protected] 21 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

I don't know where to begin for traffic monitoring like that. HetrixTools?

Do scrapers have a reason to download whole videos? Or are they just interested in the comments?

[โ€“] [email protected] 19 points 3 weeks ago (1 children)

Do scrapers download whole videos?

I don't know, each one is designed for a specific purpose. Some people might scrape for archival reasons, some might do it for AI training data, some might do it to build analytic user profiles, some might do it for academic reasons, some might do it to build search indices. I can't think of a great reason to just download all the videos, but people do really dumb shit when someone else is paying the bill.

I don't know where to begin for traffic monitoring like that. HetrixTools?'

Unfortunately I don't have any great recommendations here. I'm looking into this myself. Ideally you'll want a tool that can monitor the network interface and aggregate data on bandwidth per IP or MAC. That will at least give you an idea if anything seems egregious. (if it is by IP, it could be a large number of machines behind a NAT though, like a university or something). ntopng has piqued my interest. I might try it out and report back.

[โ€“] [email protected] 12 points 3 weeks ago

Ntopng seems useful. They're really trying to push licenses for "enterprise" features, but the "community edition" is available under the GPLv3 license and allows you to track throughput to remote hosts. Not sure how much of a performance impact it makes.

[โ€“] [email protected] 18 points 3 weeks ago

Grafana & Prometheus is a good place to start, PeerTube even has a guide on how to monitor your PeerTube instance with them https://docs.joinpeertube.org/maintain/observability

[โ€“] [email protected] 8 points 3 weeks ago (1 children)

I devote exactly half of it to a nginx cache for the object storage. It caches for up to a year.

I bet there's a ton of low hanging fruit optimizations to be done with the caching

I couldn't find Nginxs replacement policy but I'm going to assume it's LRU like 99% of everything else

Can I ask what your current caching strategy is? Like what/how things gets cached

I.e. what types of files, if any custom settings like this file needs to be requested at least 5 times before nginx caches it (default is once), etc.