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.
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.
there is https://github.com/flareact/flareact in development by a shopify engineer, worth checking out... seems like a good architecture for deeper integration with workers runtime
Agree. Also, FWIW, what Cloudflare built is definitely a nice option. I would prefer even closer integration though and will be test driving this.
But… This is almost just like an index.html and api.php file on a server. I think what devs really need/want is the Svelte Kit adaptor but an official Cloudflare way.
Edit: Apparently the functions support parameterized files like .functions/friends/[name].js [1] which creates a lot closer integration. Put that feature front and center! I think this really solves many issues.
Thanks for bringing this up! It's definitely something that is on our radar. We're looking into improving the experience with frameworks, and Next is one of them!
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?
I'm interested in non-git deployment as well. For an image-heavy site, I would really prefer to avoid having to store static assets in GitHub so that I don't have to deal with git LFS. It would be nice if their CLI tool could support directly deploying a Pages application.
Right now, you can only create a project through GitHub/GitLab. However, being able to upload your pre-built assets directly to Pages is something we are working on now! Listen out for updates!
Does Pages now support multiple deployments from a single git repository? When I looked a while back it seemed like there was no way to host multiple domains on CF Pages from a monorepo. GH Pages has the same limitation, but Netlify does support monorepos.
I hope this doesn't come across too aggressively, but if merely clicking "refresh" doesn't do the trick (as suggested through a recommendation to clear cache/cookies) please investigate some cache-busting techniques!
Hi! Do you know if this release changes the ability to enable wildcard subdomain routing to Pages without requiring a >$200/mo Enterprise plan? Its a feature Netlify offer in their $19 "Pro" plan and is a roadblock for us to fully leverage Pages.
What is your story with Pages and Rust Workers? Will they get the benefits of automatic deployment or is it still required to use Wrangler and manually wire things together?
Where is information on gitlab support? I didn't see it linked in the post. Is this just the main gitlab service, or are any third party gitlab servers possible?
I'm building a svelte-kit based blogging framework called Svekyll with a hosting service called ExtraStatic. It all uses gitlab on the backend and I'm very curious if you could author on ExtraStatic and then publish into cloudflare. Right now I use the static adapter but I'm interested in seeing if the cloudflare adapter just works.
ExtraStatic is interesting because it allows you to publish without really knowing git. You can publish using just email, or you can use the creator tool or the Android app to publish into gitlab and then it builds automatically. Hosting on cloudflare would be awesome.
Unfortunately, it looks like this only works with gitlab.com. I don't think my GitLab instance will work as this blog post describes. It's still an incredibly cool offering and I am sure there is a way to do it with just vanilla CI inside my GitLab instance.
Great announcements today. Hoping you can share any expected progress on the long build times (chiefly initializing the build environment itself), which right now constitute the only real down-side of CFP IMHO.
If I just wanted to deploy a blog from github to Cloudflare pages, what would be the best way of doing that without writing javascript? Is there a way currently?
Absolutely possible! If you've just got a folder of static assets, you can connect it up to Pages, and enter that directory as the "build output directory".
Tried that, what I really like about Cloudflare is that it offers me more freedom than Github which basically forces you to use Jekyll if I'm not mistaken.
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!
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.
We are only half way through their "Full Stack Week", so I'm hoping they have something coming on that...
Monday was Workers talking to external services + durable objects.
Tuesday was upgrades to workers and the toolkit to make it easer to develop full apps on them.
Wednesday (today) was Worker+Pages integration and front end development.
No announcements yet of any upgrades to the Worker Key Value store, wouldn't be surprised if they have a day of datastore type announcements - its the part of the "full stack" they haven't covered this week yet.
They have to climax on Friday with something big right?
Wow. I didn’t know it was a full week of announcements. I was thrilled with the static typing thing yesterday and this today, so I’m pretty excited to see the next 2 days now.
Plus, at the end of the week, announcements related to Web3 services during a broadcast on Cloudfare TV. Their CEO will be talking to a prominent crypto investor.
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.
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.
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.
Does Datadog really directly compete with PagerDuty? They integrate with one another, and my company uses both, though honestly if Datadog made the kind of alarm-level notifications functionality as PagerDuty I probably wouldn't need PagerDuty anymore. That said, the simplicity of a single-purpose product definitely also has its appeal.
There is no one who is eg the GM of Heroku. Salesforce has no idea what they have and are basically tying to figure out how to get existing SF customers to use it. I think they want Heroku customers to start using SF more but have no clue how. The result is that Heroku feels abandoned and on life support.
Its too bad because Heroku is a great product that has a ton more potential.
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.
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.
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).
Fwiw, consensus, in some circles, is that's a very limited offering and they like to entirely delete accounts after the trial if you don't respond to their sales/onboarding emails.
They may even continue to email you reminders about your trial expiring and tell you that you can still use all the free tier offerings, even though you can't log in anymore because the account is gone.
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.
"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.
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.
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.
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 :-)
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.
Vue was working pretty well for me until I decided to rewrite the whole project in Typescript. I hit a problem with Webpack that devoured all of my memory during a build, and despite spending days on it, I couldn't figure out why it was happening. The Vue CLI was also having similar problems, if I remember right, so I tried to replace the Vue CLI with home grown scripts. That didn't work either.
So, I looked at other options, and discovered Svelte. I originally converted from Vue to Svelte out of necessity, but I've grown to adore how it's structured and how "Javascripty" it feels.
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.
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.
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?
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.
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 :)
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.
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!
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.
Very often I'll have some function that works fine locally but breaks when deployed to the serverless environment and figuring out why it's broken takes a lot more time than expected. Often it's because I was using some feature that for some reason or another is not supported in the serverless sandbox but other times it's memory or CPU limitations that are completely opaque and impossible to debug. For example, is it possible to use libraries written in C. Node.js has a bunch of libraries like that and it's never clear if those are supported in any given serverless environment.
Most of these platforms also don't have actual hard limits so it's possible to use up whatever budget is allotted to a project and then get throttled randomly without any indication of what exactly happened or why exactly the limits where reached. Maybe things have improved since last time I tried these platforms but I'm doubtful. It's very hard to design easily debuggable systems when there are so many layers of abstraction involved and there is no way to actually set breakpoints and see what is going on in the live process.
Well for workers these questions can be answered more straightforward than for lambda:
Will a node/C thing work?
No. Only third party packages that are cleanly isomorphic will work. The most exciting thing you get is fetch. You can compile things to WebAssembly I guess.
is performance good?
For HTTP response times it‘s top notch. For compute, if it matters then it‘s not a good use case imho.
If you‘ve had performance issues with workers (not compute bound) I would like to hear about them, because I have put it into a "way to go when I want every answer to be reliably fast" bucket.
Debugging?
Well… it‘s a matter taste if what they provide is enough. Better than lambda but worse then a local server.
Does this require putting your website behind Cloudflare captchas, cause if so I don't foresee being able to use this. There is no reason to captcha a static website IMO.
I predict that Cloudflare will try to acquire Netlify in the near future. This product is getting pretty close if not entirely in direct competition with them.
Cannot see that happening. Netlify is too big and has raised a lot of money, its already hard enough to deal with organizational debt once you become a public company. They acquired Linc, it was a pretty small startup and Glen Maddern their CTO is the engineer in this blog post. He also happens to be one of the smarter folks I've met. I really like the folks at Netlify and Vercel very much, all good people, but it I think it makes more sense that CF just takes the valuation of those two startups and tries to add it to their market cap organically.