CloudFlare has cut the bandwidth use of NostrGram by 70%! Smaller files and images being served to your device(s) is increasing performance, too. In addition, I made a significant performance improvement to the database that has it running like a top now. The database server is yawning at the load now 🥱. Plenty of room for growth at these levels!

Reply to this note

Please Login to reply.

Discussion

Have never set up Cloudflare; is it possible to have it cache query results or does it always hit the origin server for queries which I imagine must be dynamic?

It does caching but that's at a higher price level than I'm paying. Besides I can't use that caching because the feeds update constantly so caching the results longer than a few seconds would result in stale feeds. I can definitely see the benefit to sites that have queries that last longer though. I'm very impressed with the service so far.

Got a few people onboarded to nostrgram today. They all say it’ss their favourite now due performance. Other web clients have much longer load times. Thanks for update.

🙏

Looking into CloudFlare, I guess it would run on top of AWS, replace my CDN? Interesting.

You just change your DNS to point to CloudFlare and it stops bots, compresses images and files and redirects back to your site for non-bots and files it doesn't compress. It was super easy to setup and wasn't expensive at the basic level ($25 USD/mo).

Highly recommend R2 bucket for static files