logoalt Hacker News

Manchitsanantoday at 2:28 PM6 repliesview on HN

I'm currently running a SaaS on Cloudflare Workers + Pages. The developer experience is genuinely good, deploying serverless functions and static sites from the same repo has been seamless.

But I hit a real issue recently: CDN edge caching served stale HTML after a deploy, and the service worker cached the bad response. Took a CDN purge from the dashboard to fix. The debugging experience when things go wrong at the edge is painful, you're always guessing which cache layer is the problem.

That being said, the free tier is hard to beat for getting started. Workers, Pages, KV, R2 — you can run a full production app at near-zero cost until you hit scale. Not sure if Bunny offers that.


Replies

ossa-matoday at 2:53 PM

Cloudflare's biggest benefit is the wrangler cli which when paired with claude code means that you can completely handoff setup/debugging/analysis.

Some of you may be skeptical about this but it allows for much easier management when working on multiple SaaS/hobby projects/personal tools.

show 1 reply
michaelbuckbeetoday at 3:11 PM

Bunny has a lot of that (they have a sqlite compatible API, edge functions, but the call it something different, etc.)

That being said, I had enough issues with Bunny and CF debugging across regions that I made this free tool to do both remote HTTP and TCP traceroutes to keep my sanity: https://dnsisbeautiful.com/global-http-availability

danielskoglytoday at 4:53 PM

This is why we purge cache from CI after a deploy[0], and other places when our users publish a story, etc.

That said, the edge-caching being how it is, it's possible to run into some race-conditions where the cache has been purged but not propagated to the edge network, and if visited too soon, the stale version might end up back into the cache.

[0]:

  curl --fail --output "/dev/null" --silent --show-error -X POST "https://api.cloudflare.com/client/v4/zones/{our_zone_id}/purge_cache" \
    -H "Authorization: Bearer $CLOUDFLARE_CACHE_PURGE_API_TOKEN" -H "Content-Type: application/json" \
    --data '{"hosts": ["instorier.com", "www.instorier.com"]}'
Sammitoday at 2:43 PM

Yeah ran into that too, and found someone else that wrote a script for it, so we're not alone: https://bash.cyberciti.biz/web-server/linuxunix-bash-shell-s...

wahnfriedentoday at 2:56 PM

Bunny doesn’t have a free tier, but their greatest asset is that it has prepaid billing: there’s zero risk of running up a surprise six figure bill just because of being attacked, making a mistake with a deploy, or other sudden sources of resource usage. I’d rather my site go down than to be on the hook for hundreds of thousands, which many projects have no hope of generating from sudden spikes in traffic of any source.

There’s a cost limit to how much high availability is worth on any project but vendors like CloudFlare don’t respect that.

show 1 reply
jtbakertoday at 2:55 PM

DB seems like the main shortcoming in the stack for them. I don't want to deal with the limitations of D1. Seems like a serverless postgres setup a la Neon/Supabase would be a slam dunk.

show 1 reply