4 ms·
I find it kind of interesting that people frowned upon CGI because it was not efficient. And yet here we are using lambas on AWS like it’s the best invention ev
by roywashere 4y ago
I find it kind of interesting that people frowned upon CGI because it was not efficient. And yet here we are using lambas on AWS like it’s the best invention ever
- SoapSeller 4y agoDoesn't lambdas are more efficient than CGI due to ability to keep the runtime env running (JIT cache and all)?
- saurik 4y agoYeah: AWS Lambda feels a lot more like the things that came after CGI, not CGI.
- speedgoose 4y agoYes it’s like FastCGI. But expensive.
- scotty79 4y agoFunny how the word "expensive" when referring to code execution might today mean actual money, not just memory or time.
- pjmlp 4y agoThat is why with experience one learns to ignore fashion trends until they eventually either become unavoidable, or fade away from conference talks.
- agumonkey 4y agoI wonder what's the best way: try to extract profit from the fads (cynic) or isolate..
- squarefoot 4y agoNo web dev here, but if memory serves, the main concerns about CGI were about safety, not performance or efficiency. If that's the case, I wonder if new more safe languages could make its use viable again.
- yakubin 4y agoWith people reaching for kqueue, epoll and io_uring to handle the C10K problem it seems that spawning processes wouldn’t be a great idea, with the latency and memory overhead of spawning itself, as well as the meagre limits of the number of concurrent processes in a system.
- mrweasel 4y agoOne issue was that people configured CGI wrong. You had executable scripts that had free range on the entire filesystem. Ideally you'd need to limit the cgi-scripts to a chroot, but that made it difficult to use Perl, Python and PHP. OpenBSD shipped/ships a chrooted Perl for use with CGI, but other operating systems just left that bit as an exercise to the programmer. More modern languages like Go or Rust provides a lot of safety and is pretty easy to statically compile, so it's easily chrooted. It would however be weird to do a CGI program in Go, because that language already have a really good build in webserver and more powerful/easily accessible features for interacting with requests compared to what CGI provides.
- sgbeal 4y ago> It would however be weird to do a CGI program in Go, because that language already have a really good build in webserver and more powerful/easily accessible features for interacting with requests compared to what CGI provides. Noting that not everyone has the ability to run standalone servers on their web hoster. Shared hosters generally enable CGIs but cannot support per-user standalone servers, in particular not on common ports like 80 or 443.
- ptx 4y agoWhat safety concerns are you referring to? CGI scripts often had issues with SQL injection and shell command injection, but that was because of badly designed (or poorly used) libraries and unrelated to CGI itself. Or if CGI programs were written in C (as a result of performance concerns) those would of course have the usual memory safety issues of C programs.
- geenat 4y agolambda = highest efficiency path for your money into bezos' bank account.
- revskill 4y agoBecause people lack enough time, but have enough money.
- Existenceblinks 4y agoStart time yeah. They seem to have a lot of time later trying to come with something more time efficient in long term.
- ilyt 4y agoYet they always find a time to wank with some new tech stack instead of just using what worked before just fine...
- ojkelly 4y agoLambdas are awesome because they enable event driven computing without needing to worry about scaling. There’s other ways to get that model, but lambda makes it pretty easy.
- WJW 4y agoIf there is another request "in the queue", a lambda that is done with a request will just pick that one up instead of closing down and letting a new lambda spin up to deal with the next request. So as soon as you have enough traffic that you have $CONCURRENCY_LIMIT amount of lambdas running (otherwise you would never build up a queue of course), the execution model of lambdas approximates fastCGI much more than regular CGI. Personally I think the enthusiasm for lambdas stems from several things: - A (legitimate) interest in outsourcing non-essential things like server maintenance to somewhere else with more ops experience. This frees up the devs to work on business logic instead of worrying about backups and log rotations. - Some people are REALLY enthusiastic about the whole scale-down-to-zero thing. I personally think that that is somewhat shortsighted, since that means trading (expensive!) engineering time to save a few 100 USD per month on your AWS bill. Sometimes it is definitely worth it to cut costs, but usually it's engineers overoptimizing the one aspect of profit they have significant influence over (ie hosting costs). - Some people are very enthusiastic about how you can instantly get to "web scale" with lambdas by just putting a very large max concurrency number. That is somewhat true, but massive overkill for the vast majority of companies. It's "engineer it like Google" syndrome but with Amazon instead.
- deleted 4y ago[deleted]