Hi All,
I am trying to determine if Cloudflare Workers/Pages (with functions) is right for me, I am currently using Fly.io with a few server-side rendered apps.
So my understanding is that Cloudflare Pages with Functions or Workers with say HonoJS generating an SSR site will cost per request… Favicon is a request, CSS is a request, Embedded Images are a request, Client side JS, the page itself is a request etc etc…
So a single page alone could have multiple requests, even though Cloudflare is generous with both the free plan and paid $5 plans I can see a fairly used site with medium traffic using that in no time at all.
Surly this will add up and be quite costly, Can anyone give me an idea of the cost or a fairly busy / Medium-traffic website (I know this is a general/open-ended question)…
But how much do you pay?, Do you use Cloudflare for full stack SSR sites/apps ? …
and what are your experiences with the platform ?
I particularly like the look of Astro but how can I have say 25% of the pages via SSR and 75% static… Only way I can think of is to build the 75% and then somehow render the rest with functions (if I was using CF Pages).
With these frameworks there doesn’t seem to be a way of best of both worlds, so I need to choose either my site in SSR or SSG.
Just trying to get my head around it and understand the possible costs.
What gives you the idea that all requests are paid? For these frameworks, they do only run Functions when needed (doing SSR) not when serving static assets. That continues to just hit Pages and is free.
If they generate an _routes.json (like Astro and others do) then they invoke Functions for the requests needed - Routing · Cloudflare Pages docs
Hi WalshyMVP,
So I just ran some tests based on the links/info you provided above… Yes it generates a “_routes.json” file (which is written over each build) which excludes common/static files that are in the public folder…
But I can’t choose eg files in folder “A” are SSR and generated on the fly by Cloudflare, but files in folder “B” are static (after the build process) and are not to be generated by Cloudflare as they were built during build time.
I understand the public folder is the solution to this problem but these frameworks mostly seem to be all pages SSR or all pages SSG not in-between. This is where I think the costs can add up.