1. 38
  1.  

  2. 10

    I think this is wrong? One of the defining characteristics of “serverless” is its ephemeral and doesn’t have local state. But cgi-bin almost always implies some degree of durable filesystem access.

    1. 18

      I have a cgi-bin app that just runs a Perl script that displays Swedish holidays. No local storage, it’s all code :D

      http://gerikson.com/cgi-bin/helgdagar.cgi

      1. 4

        Ephemeral is a good way of describing it. The “serverless” platforms that I have used take time to spin up the first request… say 300ms because they have to initialise the environment, copy the files into it, etc. Then every subsequent request takes about 30ms because the “serverless” environment is warmed up.

        What happens behind the scenes is on that first request they deploy a VM/container with n GB of RAM and n number of cores, copy the application into it and then use that to serve requests. So long as the instance is kept warm with frequent requests the local storage will persist until a long enough delay between requests causes the instance to become cold and therefore shutdown loosing anything that had been kept in the local storage.

        1. 3

          It’s a pretty common pattern to use a Cloudwatch cron to call your lambda every X minutes to keep it warm (usually with some param that your lambda will know means not to run through your real code, but to hear the request and ignore it)

          1. 3

            I have heard of that happening, I don’t know what the benefits of that are over simply running a vps.

            1. 3

              You pay less. The lambda will run for a few milliseconds before stopping. Right now, I have about 10 lambdas that run every night on a schedule (and from triggers between each other) and it costs $0/mo because we never hit our free limit with them. Even the cheapest VPS that I’ve seen (and use personally, vultr for $2.50/mo) is still more expensive.

              1. 3

                You don’t need to manage the server, other than having the cron job that pings it — e g. keeping the server patched, rotating the logs, spinning up more servers when you get more traffic, etc.

          2. 3

            Somewhere, there is somebody else’s computer (don’t call it a server) and it takes your code from somewhere (don’t call it persistent storage) (and loads it into an environment) and runs it.

            Plugging the blanks (Host, disk, linux, C) gives you a certain flavor of serverless… just like any of those WAR file hosts or static site hosts or any host which separates what is running from where it’s running.

            This kind of plugin is trying to remind us that ‘serverless’ isn’t some kind of magic solution to every problem (but it is a good solution to some problems)… if I go grab some random marketing blah off medium it definitely provides some context.

            In this article, we’ll run through all the constraints that we faced through years and made Neosperience evolve from a monolith to a set of cgi-bin microservices.

            1. 16

              This kind of plugin is trying to remind us that ‘serverless’ isn’t some kind of magic solution to every problem

              The intersection of the set of people who need to be reminded of that and the set of people who would install a browser extension that does s/serverless/cgi-bin/g on every page is the empty set.

              1. 2

                The set of people who will see the browser extension, not install it, but still benefit from having seen it isn’t though.

                1. 5

                  I’m not convinced, given that the extension’s GitHub page relies on external discussions to make its argument for it, not even bothering to curate its own set of points it’s trying to make that might be expanded upon by participants in those external discussions. Plus, as has been adequately explored elsewhere in this thread, “serverless = CGI” is excessively, and therefore also inaccurately, reductive; not to mention it’s barely even a meaningful comparison for someone who knows what “serverless” means but not “CGI”.

                  Honestly, I feel like text-replacement “statement” extensions like this generally serve little purpose beyond engendering a smug sense of superiority in the people who install them, or would consider installing them. At least “Cloud to Butt” and “Millenials to Snake People” generate some humor (puerile and absurdist/surrealist, respectively); “serverless to cgi-bin” is barely funny except insofar as it highlights the similarities between this one facet of “modern” “cloud computing” and a primordial web technology while also throwing the differences into sharp relief.

                  1. 2

                    I guess we’ll have to disagree.

                    On a completely different subject, does anyone know any good commodity lambda or code hosting providers? I’ve been doing well compiling apps to JS and going static, but for other things it’s not quite 0 effort to keep a swarm of $5 virtualized linux boxes up to date and running a whole machine as a joke relay or demo or something does feel a bit extravagant.

          3. 5

            Dunno, man, my billing system runs on CGI and it definitely requires me to maintain a server.

            1. 4

              out of the loop here: What exactly does “serverless” mean (unironically) in this context? As far as I’m aware, “serverless” refers to peer-to-peer network protocols like BGP, some video games’ multiplayer, or ARP. None of these seem like they could be replaced by cgi-bin.

              1. 5

                Serverless Computing is a model where you provision things at a different level than “server”. They still obviously require a server to run, but you don’t have to manage things at the server level. A common example is Lambdas from AWS.

                Resources for more information:

                1. 1

                  Are you being serious?

                  This is referring to the ridiculous use of the term ‘server less’ to describe the pattern modelled by AWS Lambda, Azure Functions etc - “Functions as a Service” is the sometimes quoted ‘generic’ term.

                  1. 9

                    Are you being serious?

                    Not everyone lives and breathes cloud network services.

                2. 4

                  See also: “cloud to butt” (https://chrome.google.com/webstore/detail/cloud-to-butt-plus/apmlngnhgbnjpajelfkmabhkfapgnoai)

                  I wouldn’t actually use either of these, though. I vaguely remember hearing of someone who accidentally had “cloud to butt” modify an important document and didn’t notice.

                  1. 7

                    The NYTimes published an article that replaced Great Recession with Time of Shedding and Cold Rocks because the writer forgot to turn off the millenial snake people extension.

                    https://www.nytimes.com/2018/03/15/smarter-living/browser-extensions-text-swapping.html

                  2. 3

                    ✓ You just upload code, and it works!
                    ✓ No deployment procedures, no servers to restart!
                    ✓ No monoliths and routers, just make a request to that one bit of code!
                    ✓ You can connect to a database on another machine, and the front-end will scale horizontally!

                    Old is new again, but thankfully it doesn’t use FTP this time.