Live data from Hacker News

The demise of the mildly dynamic website (2022)

devever.net

71–80 of 183 posts

Re: The demise of the mildly dynamic website (2022)

#72
post #8

> What captured people's imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn't consume resources when it's not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. In fact, it's far easier for me to write a PHP script and rsync it to a web server of mine than for me to figure out the extensive and complex tooling for creating, ma…

In a lot of these discussions the point gets raised about the work to maintain a self-hosted server. When i've done it I install the os (usually ubuntu server), turn off unused services, setup the firewall to only allow required ports, and then it just sort of sits there and does its thing. Uptimes have been measured in years in some cases and the server just sits there happily serving whatever html and connecting to…

Do you enable unattended upgrades and kernel live patching? If not, then that doesn't seem secure.

Re: The demise of the mildly dynamic website (2022)

#73
post #35

Earlier quoted context omitted.

The author’s assertion isn’t correct though. Yes, technically speaking a PHP script that isn’t being executed isn’t itself costing you money. But it’s stored on server that is running 24/7 and is costing you money. Set up in the traditional way, CGI/PHP is priced by server uptime, be that per hour, per day, per month, whatever. The server runs all the time, it waits for requests, it processes them. By contrast Lambda…

So it's like code-only shared hosting, billed by CPU-time rather than wall-time, and with a load balancer in front.

And mind the opportunity cost: You never learn how to set such a thing up yourself; and AWS runs off to the bank. Where you could have had an asset, (frequently a good idea), that you can do something with.

Remember, the innovation of cloud was to add a payment, IAM, and config layer on top of basic compute tasks.

Re: The demise of the mildly dynamic website (2022)

#74
post #38

Earlier quoted context omitted.

So it's like code-only shared hosting, billed by CPU-time rather than wall-time, and with a load balancer in front.

And it scales to multiple servers to accommodate traffic without your input. But essentially, yes. Not to sound uncharitable but I’m confused by statements like the OPs who profess to not understanding what Lambda is… it’s not actually that complex!

Didn't know enough about it to know whether I should care enough about it to investigate more.

Re: The demise of the mildly dynamic website (2022)

#75
post #58

I like the idea of just renaming an `html` file to `php` and adding a bit dynamic stuff. A webserver that could do this with JavaScript/TypeScript would be cool! (Or maybe I should learn php…)

Yeah, I was shocked when, coming from PHP, I realized that in Python, in order to serve a website, you have to start and maintain an extra server process.

Re: The demise of the mildly dynamic website (2022)

#76
I'm amazed on how well this article fits with a new product that we have been working on at Wasmer. AWS Lambda is great, but it doesn't really solve the cold start problem of dynamic languages. Nor does FastCGI.

We are very close to launch Instaboot, a new feature for Wasmer Edge that thanks to WebAssembly is able to bring incredible fast cold-starts to dynamic languages. Bringing 90ms cold-start times to WordPress (compared to >1s in state-of-the-art cloud providers).

Re: The demise of the mildly dynamic website (2022)

#77
post #35

I sometimes wonder what the hell AWS Lambda is and whether or not I should care. Now I have a succint answer: > What captured people's imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn't consume resources when it's not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. From now on, when anyone mentions "AWS Lambda" I'm going…

The author’s assertion isn’t correct though. Yes, technically speaking a PHP script that isn’t being executed isn’t itself costing you money. But it’s stored on server that is running 24/7 and is costing you money. Set up in the traditional way, CGI/PHP is priced by server uptime, be that per hour, per day, per month, whatever. The server runs all the time, it waits for requests, it processes them. By contrast Lambda…

> By contrast Lambda only costs money while your code runs.

There is no fee for uploading it, only a fee for executing? In that case could I upload a function that only disgorges a static payload? Then I could store a multi-GB file for free and just invoke it in order to download the data.

Re: The demise of the mildly dynamic website (2022)

#78
post #62

I sometimes wonder what the hell AWS Lambda is and whether or not I should care. Now I have a succint answer: > What captured people's imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn't consume resources when it's not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. From now on, when anyone mentions "AWS Lambda" I'm going…

Lambda is also distributed , though — while CGI scripts just live on the webserver itself. So if you're old like me and want a crisper mental model, the actual '90s equivalent of Lambda would be: • a cluster of "diskless" web-server (let's say Apache) machines with a round-robin load-balancer in front of them; • where these web servers are all using mod_userdir, pointing /~*/ at, let's say, "/wwwhome/*/www/" — and wi…

> Lambda is also distributed, though — while CGI scripts just live on the webserver itself.

Most of the stuff people use lambdas for they could run from the cheapest Digital Ocean droplet or cheapest Hetzner server.

You need "omg distributed" perhaps after your millionth user, and even then it's highly debatable.

Re: The demise of the mildly dynamic website (2022)

#80
post #36

I sometimes wonder what the hell AWS Lambda is and whether or not I should care. Now I have a succint answer: > What captured people's imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn't consume resources when it's not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. From now on, when anyone mentions "AWS Lambda" I'm going…

I understand the sentiment, but to be fair, CGI doesn’t give you an infinite scalability. AWS Labmda based solution is far less susceptible to something like HN hug-of-death.

> but to be fair, CGI doesn’t give you an infinite scalability.

That your startup with three users will never need.

Your startup with a million users will not need it either

Post reply on HN