Friends of the #BSDCafe and of the #Fediverse,
initially, for just over a year, BSD Cafe’s media was stored in a FreeBSD physical server jail with an outgoing bandwidth of 250 Mbit/sec. To address bandwidth congestion, I had integrated Cloudflare with a tunnel, serving media (and only media) through Cloudflare.

In line with the principles of self-hosting and data ownership, I’ve decided to remove Cloudflare. This has led to some bandwidth congestion when media was posted and slower download speeds for users, particularly during peak times. This is because as soon as content is published and federated servers are notified, they will rush (depending on how full their queues are) to download the newly published content - media included.

I’ve now revised the setup (currently in beta) by moving DNS management to two personal nameservers run with PowerDNS. The media server remains the same, but I’ve added two reverse proxies, one in the USA and one in Germany (the media server is in Poland). They’re connected to the Media server via WireGuard.
I’ve installed the excellent Varnish and created a custom VCL. Media requests will be directed by the PowerDNS LUA scripts to the caller’s closest reverse proxy. Nginx will pass requests to Varnish, which will serve data from the cache if available. If not, it will fetch from the original server, but request volume has decreased significantly.

I’m analyzing the results, and they look very promising. I may expand this home-made CDN by adding more VPSs, potentially closer to Asia and Oceania.

A detailed blog post will follow.

Stay tuned!

#SelfHosting #DataOwnership #OwnYourData #Varnish #PowerDNS #ReverseProxy #CDN #BSDCafeUpdates #BSDCafeServices #BSDCafeAnnouncements