top | item 29253032

Cloudflare Pages goes full stack

350 points| samwillis | 4 years ago |blog.cloudflare.com | reply

123 comments

order
[+] nevikashah|4 years ago|reply
Hey there - I'm the PM for Pages! Super excited about this release today. We also announced our support for GitLab and partnerships with several CMSes! Happy to answer any questions.
[+] technobabbler|4 years ago|reply
It's really exciting to see Cloudflare Pages keep progressing!

Any plan to eventually offer drop-in support for Next.js? (Not just static builds, but the backend server/serverless functions too, like Vercel... maybe mapping certain APIs to Workers?). It would be lovely to be able to leverage the power of that framework on Cloudflare infrastructure.

Edit: Next and frameworks like it solve the "I love the idea of serverless, but don't want to reinvent the whole backend from scratch" problem. It's nice to have a framework abstract away problems like routing, caching, invalidations, buildchains, image transformations, etc. Cloudflare Pages and Workers can do almost all the same things, but requires more coding and configuration... that's the only reason we went with Next + Vercel instead of Pages.

[+] zapita|4 years ago|reply
Is there a way to push content directly to Pages instead of having it pull from Github or Gitlab? Many teams have their own deployment tooling with pre-existing git integrations, and would rather add a Pages target to that. For example Netlify lets you bypass their github pull feature. Does Cloudflare?
[+] boleary-gl|4 years ago|reply
GitLab team-member here. So exciting to see GitLab support! I'll finally be giving Pages a try later today. :)
[+] seeekr|4 years ago|reply
Pretty cool to see them support Svelte(Kit) as the (or one of?) the first frameworks with direct support! Recently deployed a new application on Vercel, but very much looking forward to when Cloudflare will be an equally, or even more appealing choice! Amazing work, fantastic direction, keep it up!
[+] lucasyvas|4 years ago|reply
Well on its way to being a huge contender in this space now. As I was saying on another post, I'm really just eager to see them roll out an in-house, more conventional datastore option that plugs in with this.

If I can create a full-stack preview environment comprised of all these services, that will be huge. It's edge (no pun intended) is that it's globally available by default.

[+] dvasdekis|4 years ago|reply
Would love to see support in your Terraform provider for CF pages - has been an open issue on your Terraform provider since April: https://github.com/cloudflare/terraform-provider-cloudflare/...

For context, our organisation has moved completely to Terraform for all our Cloud components, and not having Terraform support for Cloudflare Pages makes it a no-go. Even our Data Warehouse team has moved completely to Terraform, so something as 'webby' as static site hosting should be a simple use case.

[+] zeckalpha|4 years ago|reply
You can contribute such a terraform provider from your end.
[+] cloverich|4 years ago|reply
It is amazing to me that Heroku is sitting there letting everyone pass them by. Heroku is still a great platform for a scalable 0 effort full stack application. Yet as soon as you need a CDN hosted static site, you look outside the platform. Which is nuts, because they are such natural progressions (both ways) of each other.
[+] bloodyplonker22|4 years ago|reply
These are wonderful companies -- one trick ponies. They come up with one great product and it almost sells itself. That is, until they cannot come up with new supporting products to increase growth. At this point, the companies install an outside CEO, or they get acquired by a large company while everyone smart cashes out and leaves. The smaller and more agile companies like Cloudflare completely take their market share with a product that will eventually be better. They are like little does that get eaten by the wolves.

Another example is pagerduty. A company that has been around for well over a decade with no product innovation. They installed an outside CEO, a sales/marketing person who really doesn't have the technical know-how to come up with new innovations. As of today, Datadog has entered their market with a direct competitor product. The CEO of Datadog, conversely, lived and breathed dev-ops in his entire work career. He is the wolf that will be eating the lunch of the non-technical does.

[+] dopeboy|4 years ago|reply
Agreed. Salesforce has really let it languish. You're even seeing superior offerings with direct competitors like Render.
[+] grolle|4 years ago|reply
Look, we're building codesphere.com for exactly that :)
[+] redm|4 years ago|reply
It's interesting how the news cycle goes. Today on the HN homepage:

Netlify Raises $105M (netlify.com)

Netlify Acquires OneGraph (netlify.com)

Cloudflare Pages Goes Full Stack (cloudflare.com)

It will be interesting to see how this all plays out..

[+] spyke112|4 years ago|reply
I for one will be migrating my static sites away from Netlify. I were just waiting for the Gitlab support.
[+] destitude|4 years ago|reply
That is an interesting observation. I'd think Cloudflare has the upperhand because of their CDN and soon built-in object storage with "no" egress fees... going to be hard to compete against that.
[+] lewisjoe|4 years ago|reply
As an indie software maker it frustrates me when I have to pay 50$ dollars to have a decent cloud server setup to run my apps. Yes there are 5$ shared vm-s, but I want a decent enough ram and cores to lift my load. And a 4gb ram and 4 cores shouldn't cost me 50$ either.

I knew when WASM was introduced, this will bring out a new dimension of computing power available at affordable cost. But I wasn't sure how. But now I know. Cloudflare is doing some incredible work here, launching cloudflare workers and then capitalizing it to bring low cost computing to other edges. If lucky, we might enter an era where cloud infrastructure doesn't gets polarized into hands of tech giants like amazon, microsoft and stays affordable as it once was.

[+] welterde|4 years ago|reply
There are many many providers that offer deals that are more than within the stated budget.

Hetzner Cloud will give you around 16-32GB and more than 4 cores for <50$. For similar amount of money you can also get a dedicated server from them (and many other providers) with > 60GB of RAM, > 4 cores and nvme. Scaleway, OVH and others also have offerings that are not too far off (but less familiar with their offerings).

[+] Tomte|4 years ago|reply
Oracle Cloud free tier. 4 cores ARM64, 24GB of RAM, 200GB disk.
[+] jeremyjh|4 years ago|reply
What does any of this have to do with WASM? WASM is still a second-class citizen on Cloudflare Workers and Javascript is still the only really practical choice.
[+] locusofself|4 years ago|reply
"By using your repo’s filesystem convention and exporting one or more function handlers, Pages can leverage Workers to deploy serverless functions on your behalf. To begin, simply add a ./functions directory in the root of your project"

just my .02 but that first sentence is way more confusing than it needs to be.

[+] acjohnson55|4 years ago|reply
I'm pretty sure it just means that file paths are mapped to URL routes and the functions exported within become handlers for the given HTTP methods. This would be as opposed to implementing the routing logic as code.

But I haven't used it, so I don't know.

[+] EGreg|4 years ago|reply
Honestly, I don't see the point in "serverless" as they call it (which is actually servers / centralized clouds), except maybe to have a common compilation target for stuff, to limit the surface area of APIs.

Literally you can just control a lot more about your stack and do what you want (mysql, outside APIs, etc.) and use your servers as origin servers for the CDN. You can take your regular PHP site, separate out the "session-dependent" stuff into a separate service, and the rest is static resources that can be cached.

Or even better: do ACTUAL serverless:

https://qbix.com/blog/2018/04/03/onward-to-qbix-platform-2-0...

https://qbix.com/blog/2020/01/02/the-case-for-building-clien...

I gave a talk recently about it, that you might be interested in: https://www.youtube.com/watch?v=yKPKuH6YCTc

[+] ryan29|4 years ago|reply
The Cloudflare stuff is the first "serverless" platform I've considered using. I develop independently and the value proposition is too good to ignore. They scale to $0 on idle deployments, I don't have to maintain any infrastructure, I don't need CI systems for building and deployment, I get preview URLs, I can layer in Cloudflare Access, etc..

I'm going to drink the Kool-aid and see how it tastes :-)

[+] kart23|4 years ago|reply
price & convenience. It's really that simple.
[+] camgunz|4 years ago|reply
Supporting SvelteKit out of the box is huge for Svelte. I wonder if it's on the edge of an adoption surge.
[+] bovermyer|4 years ago|reply
This is anecdotal, but migrating my biggest personal project from Vue+Webpack to Svelte+Rollup was one of the easiest and best changes I've made so far.

Recently adding esbuild to the mix made things much faster, too.

[+] bastardoperator|4 years ago|reply
Awesome. I want to use Cloudflare more, especially the email service they announced. How much longer do I have to wait for these things to become GA?
[+] rita3ko|4 years ago|reply
Pages itself has been GA for a little while now (https://blog.cloudflare.com/cloudflare-pages-ga/). For the integrations with Workers, it's TBD (we generally want to leave things in beta for a bit and let it bake in before giving you the thumbs up to put your production site on it), but we move fast, so likely sometime in the first half of next year.
[+] 0xy|4 years ago|reply
This is really exciting stuff, they're so close to a one stop shop for DevOps, monitoring, serverless backend, file storage, data store and frontend asset serving.

I feel it's now within reach to migrate one of my side projects, except Redis and Postgres which I'll have to keep on AWS for now.

It seems they're building a fully integrated developer experience that abstracts so much complexity away from deployment, security and otherwise.

I have to imagine database and other solutions like pub/sub will be coming at some point in the future, too.

(disclosure: long $NET)

[+] rtcoms|4 years ago|reply
postgres can be hosted via supabase. Redis also has cloud service I think
[+] buraktokak|4 years ago|reply
If they handle nextjs integration, would be very interesting.
[+] colinclerk|4 years ago|reply
How does everyone feel about Wrangler CLI versus git-triggered deploys through GitHub?

I think Vercel and Render are both doing an incredible job with their deploy processes, and a lot is owed to them not requiring use of a CLI. I wonder if I'm in the minority here?

[+] lucasyvas|4 years ago|reply
Personally, I prefer a separate deploy command if you want it - it allows you to more easily use external CI systems. There are several app platforms I've written off because they only worked via git.
[+] squaresmile|4 years ago|reply
We are using GitHub Actions with wrangler and it works fine. Git push and the site is deployed to worker kv site.

It didn't do the one commit one subdomain though but maybe they are adding it with this announcement.

[+] haliskerbas|4 years ago|reply
Cloudflare pages is amazing and IMO the right direction. For a small project its so easy for me to create an html file and zap it right into a custom domain in a few minutes, with so much flexibility.

I hope the free tier stays as good as it is now! Thanks folks :)

[+] newsbinator|4 years ago|reply
I gave up on Cloudflare Workers after spending a full work day debugging CORS errors that the worker was throwing due to a logic error that was completely unrelated to CORS.

You can only spend so many hours in your life tweaking and re-testing CORS headers for no reason.

Maybe Pages is better. I just don't want to touch Workers on the backend of Pages anymore.

[+] nevikashah|4 years ago|reply
Sorry to hear about your experience with Workers. Be sure to get in touch if you have more questions about it. If you'd like to try out Pages, we recently announced support for setting custom headers with an `_headers` file. Check out the announcement here(https://blog.cloudflare.com/custom-headers-for-pages/). Docs are also linked in the blog!
[+] holonomically|4 years ago|reply
Curious to know if anyone is running real production workloads with Cloudflare pages + workers. I'm asking because every time I've tried serverless offerings I've always been disappointed with the performance and debugging experience.
[+] remorses|4 years ago|reply
Cloudflare is going crazy wow
[+] brundolf|4 years ago|reply
Hmm, maybe it's finally time for me to move off of Heroku