I have been working on servers whether professionally as a software engineer or as a pre-teen making a The Simpsons fan website for a couple decades now. I have never once used that `cgi-bin`, never opened it, and still have no idea wtf it is.
Cloudflare Pages: Best server tech since CGI-bin?
171–180 of 226 posts
Re: Cloudflare Pages: Best server tech since CGI-bin?
#172Re: Cloudflare Pages: Best server tech since CGI-bin?
#173Anyways, the pages import to take an existing git repository with a slew of CMS systems (mine being Hugo) supported, and the ability to just publish it to a custom domain in a series of clicks was actually really simple.
I think I dedicated 30 minutes of entire work and just saved ~$20/month because of it.
Re: Cloudflare Pages: Best server tech since CGI-bin?
#174Earlier quoted context omitted.
This sounds magical: > Durable Objects make this easy. Not only do they make it easy to assign a coordination point, but Cloudflare will automatically create the coordinator close to the users using it and migrate it as needed, minimizing latency.
It sounds magical. I would recommend trying it first... the experience of trying to actually build anything with it is quite un-magical. The documentation, CLI, workflow, and pricing (for sockets especially) all fall quite short.
Having data flung about the place in these objects sounds a bit scary (how do I back them up, and keep track of them, how do I join data from multiple objects, and what if those different objects are all around the world).
Re: Cloudflare Pages: Best server tech since CGI-bin?
#175Earlier quoted context omitted.
They made emails and egress free because there is a lot of price gouging going on in the industry that stops people from starting businesses. https://blog.cloudflare.com/aws-egregious-egress/ Identity as service is another category that's egregiously priced, and it's usually priced based on monthly active users too, which is the worst. It would be great to see Cloudflare disrupting that one as well.
This. At this point in everything being "cloud native" fewer and fewer people and orgs have any experience building internet networks - buying transit (circuits), peering, etc. For players at Cloudflare, AWS, GCP, etc scale it's essentially free. The fact that many of them (other than Cloudflare) charge $0.08/GB or whatever for egress and that's just accepted because people think "that's what it costs" is wild to me.…
Like the old 50c/m mobile phone calls, the 10c SMS messages, then when they were free, charging for international SMS and calls, now charging for data. It is the "whales" who spend a lot of money on mobile games. 1% fee for looking after your money, Etc.
I wonder what AWS will do if they have to make egress cheap! What is the next thing they can charge for that is actually cheap but people are happy to pay for.
Re: Cloudflare Pages: Best server tech since CGI-bin?
#176Biggest advantage I find is pre-scoped request-level control over everything. When someone loads your page, every single asset request hits your worker. It's both extremely simple and exceptionally powerful. Choose which responses to modify, authenticate, proxy, redirect, or let through. All in a single file with a few dozen LOC. No complex pre-app devops, middleware or routing policies required (i.e. oh sorry that r…
Re: Cloudflare Pages: Best server tech since CGI-bin?
#177The Cloudflare cloud experience is "being sold short by subpar documentation" right now because important elements of their ecosystem are being ramped up from beta status. They also have internal docs which aren't kept up to date with their actual product. I'd check back in a few months because their beta experience can be very touch-and-go.
I have found that with Cloudflare's documentation that where it's lacking they have the ability to PR in changes and if you go back to a saved page, I've found them pleasantly updated numerous times.
Thankfully the cutting edge development is based off of open standards that you can easily build off of. I know personally that I've found most of the sticking points of developing against Cloudflare to be easily mitigated and just be an overall better experience as a customer than with another hosting provider.
It doesn't hurt that they aren't charging me all that much personally, but I have a day job that fills up the Cloudflare stock price just fine.
Re: Cloudflare Pages: Best server tech since CGI-bin?
#178Potentially stupid question: how is this different from hosting a static site on S3 and using CloudFront as a CDN? Assuming I don't need server-side JS, I don't see the benefit.
Re: Cloudflare Pages: Best server tech since CGI-bin?
#179Earlier quoted context omitted.
For better or worse fast CGI never took off much beyond PHP. Python, node, ruby, etc. all do their own thing with their own app servers and protocols. I mean sure something like python can use fast CGI but no one in that community uses it that way, everyone uses uWSGI, gunicorn, etc. Plain old CGI doesn't scale beyond toy usage--it spawns a process per request. So there really isn't a good single option for Cloudflar…
> Plain old CGI doesn't scale beyond toy usage--it spawns a process per request. I'd be willing to bet the opposite: CGI is more than enough for 80% of workload, performance-wise. There are a few good reasons why CGI isn't the best today: the tooling doesn't exist, the security model is really bad, and you can cram fewer websites on a single machine, so for the same number of websites you need more machines, and that…
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 other designs? I have an affinity for the conceptual simplicity of CGI but I've never been able to get a process-per-request server within even an order of magnitude of the performance of the more common designs. But I could be missing something!
Also, how does this design adapt to HTTP/2?
Re: Cloudflare Pages: Best server tech since CGI-bin?
#180Earlier quoted context omitted.
> Plain old CGI doesn't scale beyond toy usage--it spawns a process per request. I'd be willing to bet the opposite: CGI is more than enough for 80% of workload, performance-wise. There are a few good reasons why CGI isn't the best today: the tooling doesn't exist, the security model is really bad, and you can cram fewer websites on a single machine, so for the same number of websites you need more machines, and that…
Sure but developers don't want to bifurcate their service code and releases into a simple version using CGI and a dedicated app server version for when CGI doesn't scale for them or their users. They just want to write one python web app and run it everywhere. There's no way a CGI app can reach a million requests a second on the same hardware that a nodejs (single thread, worker loop) would take to do 1M RPS. Process…
I also find the modern approach much easier to reason about and debug. I don't need Apache + fastCGI + php + php fastCGI + apache configuration to get started. I can just run `node server.js` and my web app works.
The fact that it also scales much better is a cherry on top.