8
24 Comments

Can someone explain "serverless" to me like I'm 5?

I just don't get why it's even a word. I looked up the definition, and I've been in IT for 35+ years, so I get the server side of things, I get coding, I get virtual machines, I get containers. But if an app runs in a container, and a container runs on a server, how is that serverless? Let's say I sleep in a stateroom, and that stateroom is on a ship, how am I not on a ship? Am I shipless? I'm sitting in the kitchen of the house I own, and the kitchen is in the house, so I'm homeless? It just seems so stupidly arbitrary to me. Explain it to me like I'm 5.

on February 13, 2023
  1. 9

    Homeless 😂😂😂 that was a very nice simile I am going to steal

    I don't know why people keep giving super long answers, the answer to your question is hyper-simple:

    Serverless means YOU don't care and manage about the servers. Abstractions are used so that you can write code without caring on how many or which servers it runs.

    1. 3

      This is the correct answer. Servers are still used, obviously. You just don't have to think about them anymore. Typically you also only pay for what you use.

  2. 3

    It means that you don't have to manage any servers anymore. Just write functions and deploy.

  3. 2

    By the way, I didn’t like the analogy with the homeless either.-)))

  4. 2
    • No servers to provision or manage
    • Scales with usage
    • You never pay for idle resources
    • Availability and fault tolerance are built-in
  5. 2

    I love your analogies lol

    Serverless: It's only serverless to you because there's no server for you to create and manage. Invoking a serverless function is like getting raw compute cycles to run whatever code you like- that could be a simple action, or a container with lots of code doing complex things. You can adapt serverless to run whatever workloads you like.

    e.g. amazon can run serverless functions (lambda), or you can run serverless apps through fargate. Both require no os/server management from you.

    Because you don't have to manage hardware- setup, running and teardown, the hosting provider will charge you a premium for this ease of use. And believe me, its not cheap.

    I like referring it to functions-as-a-service better. It addresses the points your making, and pays more homage to the underlying infrastructure that's doing the running.

    1. 1

      No disagreement here, but I would add that there are services which are branded as "serverless" such as Aurora Serverless. It's kind of stretching the definition, I think, and probably exists only because it came after the original, which was basically auto-deployment of Aurora onto EC2.

      1. 1

        Yeah, especially with serverless aurora they are trying to ride the coattails of lamba.
        Should have just called it aurora autoscale lol

  6. 1

    'serverless' means being able to run server side code without having to configure/run/scale your own server.

    there is a server running on some computer somewhere of course. but you don't need to care about that part with 'serverless' services. the benefits of this is that it is less effort from your side to setup things, especially if you do not know about server side tech.

  7. 1

    For me, I basically split out all potential API endpoints and create a serverless function for each one. The API gateway connects to the appropriate function and routes the request there. This way if one endpoint is used way more often than the others then that one will scale rather than then entire server scaling. I figure this is a cheaper path until the number of requests get large enough that it might be better to revert back to a more traditional container. But in that case, hopefully revenue has scaled as well!

  8. 1

    I wonder what you think about "No-code" - since there is still code

  9. 1

    Serverless = cloud vendor runs your code and you don't have anything to do with managing the infra. Say you have a getCurrentDateTime() python microservice you structure your code in a certain way, package it up and deploy it as a lambda/faas.

  10. 1

    I got you.

    You want to make metal spoons. But you don't want to build and operate a factory.

    A factory close to you has a 'done for you' product where you can give them a piece of metal and a design, and they will make a spoon for you.

    So you hand them chunks of metal and designs, and they give you back spoons.

    Your company is 'factory less' because you don't own, manage, fix, update a factory. But you still use someone else's factory.

    Serverless is the same thing. Someone else lets you hand stuff to their server, they do stuff to it, then send it back to you. You are serverless, even though someone is still running a server.

  11. 1

    Thank you for unformation

  12. 1

    A server is still used to host and run your service, it's just not your server and/or you don't need to worry about the entire server. The server is someone else's and they manage it.

  13. 1

    Was struggling with it for a while. I don't buy the serverless approach myself, but I think I can explain.

    Simply put, you don't have to manage the server. You only deal with code and run without having to configure the server.

    Seems like GPT agrees, and even give the kitchen analogy:

    Me: Can you explain what "serverless" means to me like I'm 5?
    GPT: Do you know what a kitchen is? When you want to cook something, you go to the kitchen and use the stove, oven, or microwave to prepare your food.
    Similarly, when you want to build a website or a program, you need a computer that can run your code and serve it to other people. This computer is called a server.
    But with serverless, you don't have to worry about the server at all. It's like having someone else do the cooking for you. You just give your code to a service, and they run it for you, so you don't have to worry about setting up, managing, or maintaining the server. It's like having a magic kitchen where you give your recipe to a chef, and they cook it for you without you ever having to touch the stove.

  14. 1

    "Functions executed on a server"

    You develop a function, then you deploy it to your serverless infrastructure. This serverless function is available via an URL (mostly) and your function will be executed at this point.
    But you don't have to install Python, Apache, update the OS and so on. You have experience with containers?
    Well, then serverless means oversimplified:
    You develop some code for a container. Maybe you say you want Node 14 running, but you don't have to configure the entire docker-compose.yml stuff. And certainly not the machine that runs the container (host)

    Before, you needed to rent server and you paid a lot of money (+100$/month). (Now you need only AWS, GoogleCloud an so on).
    Then you had to install, as an example python, after that an apache server to make the server listen to http requests.
    Then you had to code in the way that your function will do something at this point the url has been requested.
    And what if you needed Python 3 but your Linux Server has also to be update to run Python 3. You had to update also your Linux Server.

    But your Server runs everything in your company, Mail Exchange Server, File Exchange Server, a crappy CRM... and now you have to upgrade the OS... and then the libraries have to be update too because your current java and so on doesn't work with the new Kernel version. And remember this mentioned CRM? Works only with Java X, but Java X works not on the new Linux Kernel...

    That's one of the use case. But the main use case is you can develop functions and deploy it very fast, without the maintaining stuff

  15. 1

    Instead of cleaning the whole ship, you clean your stateroom.

  16. 1

    Just ask ChatGPT:

    Imagine you want to play with your toys, but you don't have a table to play on. So you ask your parents to give you a magic table that appears whenever you need it and disappears when you're done playing. This is kind of like "serverless"! When someone wants to use a computer program, they don't need to own or rent a whole computer to run it. They just ask for a magic computer that appears whenever they need it and disappears when they're done using it. This way they can save money and not worry about taking care of a computer all the time.

  17. 1

    TLDR The hardware and base software is taken care of, you just put your software and run it. Also it's a catch all phrase like cloud :)

  18. 1

    😂 I could have wrote this (+20 experience in IT and systems admin). I see as one of those terms to take not literal but just as a name for something that can mean a few things and you don’t use in practice (unless you speak to a novice, or on a forum, so in those situations when you need to communicate a general idea of something). It’s a bit like cloud…it means a million things and then some, in the end for a technical person they’re always servers. As someone said, modern tech world likes abstraction also when not needed imho, but we live in times where attention span is so short, and socials are king, so we need sometimes quick and shortened communication terms. Personally I never use serverless as it makes no sense and I rarely need such term!

  19. 1

    Serverless is a way of running applications and services without having to manage servers. Instead of having a server running all the time, your code is automatically run when it's needed, and only when it's needed. That means you can save money because it doesn't have to be "always on".
    And, it's scalable. Your code will be run as many times as needed without you worrying about the infrastructure needed.

  20. 1

    Maybe a better way of thinking about it: the list of things that you are personally responsible for managing and maintaining is now serverless. Your workflow is now serverless.

  21. 1

    From what I understand, serverless and containers are different... Serverless means that your website builds and ships with all the necessary code and JavaScript available to the front end, and anything dynamic is handled with serverless cloud functions and API calls. Basically you wouldn't have to worry about the backend.

    Serverless sites are often statically generated blogs and similar apps connected to a headless CMS.