Self Proclaimed Internet user and Administrator of Reddthat

  • 2 Posts
  • 12 Comments
Joined 1 year ago
cake
Cake day: June 6th, 2023

help-circle







  • I use Wasabi storage which is more expensive as they have a minimum space allotment but because my servers are in Aus I had issues with backblaze b2 storage and the latency. (I was dealing with 200-300ms in network latency AU -> US + the time that backblaze takes to store the data).
    At that time lemmy/pictrs was not as optimised as it is now so it’s much better now.

    Backblaze comes out WAY cheaper per-month if you have servers in us/eu, as close to their regions as possible, but they also charge you for API.

    As part of an Object Storage / cdn remember you also might have to pay for egress charges as well. Cloudflare is part of the “Bandwidth Alliance” but that isn’t applicable here as pictrs needs to present the images via its own domain, (such as cdn.reddthat.com). So you’ll still want a CDN infront which will mean you will only pay once for the egress instead of everytime everyone loads it.


    • Minio’s free tier is a host-it-yourself. Where as their paid tier are for actual storage hosters, they have a minimum of 100TB/month @ $10/TB.
    • B2 has no minimum, and egress + hosting of 20GB cost me… ($0.29)
      • Note: They still havn’t billed me because I havn’t passed the $1 mark yet!
    • Wasabi (my current choice) is $7/TB (AU, US is $6/TB iirc) with a minimum of 1TB/month with out egress or api charges

    Reddthat has… looks up 150GB of object storage now.

    I would recommend B2 if you are starting out and are in US/EU. Wasabi in all other regions and have a CDN infront. (and don’t mind burning a little cash for peace of mind)



  • To get it completely free it would need to be:

    • cloudflare > vps
    • cloudflare > backblaze

    Because Lemmy does not have a way to have all media served from a different url/subdomain (like a CDN). Your setup will be:

    • cloudflare > vps
      • vps > backblaze

    Basically just put cloudflare infront of your vps, and cache everything.

    That means if a user uploaded a 10MB file, it would go though your VPS, get uploaded to backblaze. When a user looks at the uploaded image url, on the first request it gets requested from blackblaze, via your vps, and then gets cached on Cloudflare.

    Then any extra requests from then on will be via Cloudflare. So you will technically be charged for some api requests and 1x 10MB of egress traffic.


  • I would recommend Backblaze B2 storage instead of removing post history.

    The problem with post removal is that it will affect all other instances’ as you don’t (by default) cache original images from other fediverse instances (iirc)

    So for example, my instance Reddthat will reference an image hosted on your instance, which will then 404. (But the thumbnail will be cached (I think))

    Backblaze is dirt cheap and the pictrs object migration is now multi threaded making it very easy to migrate now. I was hosting 15GB and it amounted to bills of cents! $5/TB or $0.005 per GB. If you add CloudFlare Infront you then get free egress! Or any CDN that is part of the “Bandwidth alliance”. I now have ~120GB of pictrs storage. After 2-3 months.

    Also, there was a recent chat on the lemmy admin matrix channel about setting some variable in pictrs so it does not cache any images. But I don’t remember what it was so maybe check the pictrs documentation.