Live data from Hacker News

Cloudflare Pages: Best server tech since CGI-bin?

taras.glek.net

191–200 of 226 posts

Re: Cloudflare Pages: Best server tech since CGI-bin?

#191
post #4

I feel like there's a large class of tools in this space now (Vercel, Netlify) that do all of this and more, and this post is less about Cloudflare Pages and more about the (really good) state of static hosting these days? One thing that stuck out was the comment about "Twitter cards", since Vercel/Next now has this built in: https://twitter.com/vercel/status/1579561293069316096

Static hosting combined with server-side dynamic content modification using postgres was the interesting part for me. Static hosting has historically been seen as exactly that, static and immutable. Things like Cloudflare functions/workers can turn static hosting into dynamic content delivery while maintaining (most of) the benefits of static hosting. Granted, this can be done whether the underlying content is hosted…

This is exactly how we built Bluo: dynamic cms just like wordpress that deploys static assets (html,css,js,images) to cf workers.

Benefits are obvious: high reliability and speed to serve the static files. In addition, if the cms server is down for whatever reason, your website is still live and working fully (not just cached pages, all of them) just fine.

Actually you can think of it like a pre-built cache that it’s deployed to cloudflare kv store.

Other cool features we have is real time collaboration in the editor.

Check more about our architecture decisions here: https://bluocms.com/cms-cloudflare/

Re: Cloudflare Pages: Best server tech since CGI-bin?

#192

Earlier quoted context omitted.

I'm curious about cams, but I'm being greeted with "Your passphrase has expired" when I try to get it to "let me in"

Thanks for the heads up. There's nothing mind blowing on the demo page, but password has been unexpired if you still want to take a look.

It looks like something interesting, I sent an email as I got stuck after the read me and haven't had a lot of time to poke around in the code.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#193
post #27

Earlier quoted context omitted.

Having .html file extensions is very old school, and its removal is one of the popular/default redirects on all http servers that support it. Site generators also hide it through various methods (e.g. having a folder with the path name with just an index.html where a dynamic redirect isn't possible).

It was removed explicitly for SEO and having a single canonical URL for a resource _for all of time forever_. Right now we use HTML for web pages but who knows what the internet 20, 50, 100, etc. years from now will use--maybe .Super-Awesome-Mega-HTML is all the rage. If over time you are changing your site and its URLs are changing then you're breaking that canonical URL and search indexes, caches, way back machine,…

I second this. That's what mime-type headers are for. The URL should locate a resource, as the name suggests, not necessarily convey metadata about what the resource is.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#194
post #80

Earlier quoted context omitted.

Is there a reason why someone visiting your website should know or care about file extensions?

I guess no one should know whether a pdf is a pdf. Or even whether it's a .com or a .org domain - the browser should just strip all that confusing stuff away!

That's what mime-type headers are for. The URL should locate a resource, as the name suggests, not necessarily convey metadata about what the resource is.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#195

Earlier quoted context omitted.

Speed is the only reason CGI doesn't fly. What do you think is the upper limit of requests per second, if your HTTP server does process-per-request? For simplicity, assume server class hardware, that each request does no work besides producing a response, and an upper bound of 10k unique remote addresses (i.e. no more than 10k concurrent connections in a different model). How do you think those metrics compare to oth…

> Speed is the only reason CGI doesn't fly. It is indeed very very slow; mostly because it is not possible to pre-fork your CGI scripts (environment variables get set from the request, so each cgi program will have different values in the environment). But, if you could pass HTTP data via some way other than environment variables, you could pre-fork the binaries and have acceptable speed[1]. [1] Pre-forking makes a l…

Your link benchmarks with ab, which unfortunately has an unsound concurrency model, so you can't put too much trust in its results.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#196
post #61

Earlier quoted context omitted.

No it’s pointing out the server side scripting part which was new to me. do analogs exist in those other hosting options? This seems like a really nice facility - closest analog client side wise is a service worker or something that adjusts fetch.

Yes, many of the other services can do server-side rendering (SSR), deferred static generation (DSG), and/or incremental static rendering (ISR).

[deleted]

Re: Cloudflare Pages: Best server tech since CGI-bin?

#197
post #150

Those function don't suffer from cold start time? When somebody hit my webserver for the first time, how long are they gonna wait for the page to be loaded? Assuming a noop in the functions part.

Cold start is basically zero

I don't understand how...

I can understand almost zero time to start a worker, but how do they move the code?

Re: Cloudflare Pages: Best server tech since CGI-bin?

#198

Earlier quoted context omitted.

In nature, a lack of genetic diversity in a species isn't typically much of a problem until there's an extinction event, and then it can be a big problem. You might not feel the downsides of having a huge percentage of the internet going through a single provider until it's too late to change it. I actually quite like Cloudflare, and I don't think they're purposely doing anything nefarious (just following incentives…

At least it is not Microsoft, Google or Meta providing the monopoly! For now…

15 years ago Google was considered cool :-)

Re: Cloudflare Pages: Best server tech since CGI-bin?

#199
post #188

Earlier quoted context omitted.

It's similar to what I was doing 10 to 5 years ago but in Perl. Drop a file into a directory which is all or mostly static Markdown, HTML or CSS, but those files can contain markup to call other modules, as well as code files. The existence of a file is enough for its index code to be run (if it has any) and any URL-set and page components it makes available are available to other pages to be used, or served as they…

Cloudflare workers are distributed through hundreds of locations, and thousands of servers. Doing that with Perl would have been impossible. Also, remembering from my old CGI/PHP days, what usually happen is that the scripting language creep start getting bigger and bigger until it's unmanageable. I'm not saying Cloudflare workers are a better proposition now . (their ecosystem is a complete shitshow) but the idea ha…

I'm interested in why you think that their ecosystem is bad. I was going to tinker with it. Also, do you know alternatives in the space that are better?
Post reply on HN