Why I Hate Servers & Love Serverless
Tags: serverless, architecture, cloud
Published: 2019-09-17 15:34:23

---
title: Why I Hate Servers & Love Serverless
published: true
description: My personal - funny - story in why I hate Servers and fell in love with Serverless Computing...
tags: serverless, architecture, cloud
cover_image: https://thepracticaldev.s3.amazonaws.com/i/y2grfq1r2wph93xermwy.jpg
---

My relationship with servers has always been conflicting. Between `apt-get`'s and `sudo`'s, I was always **frustrated** by the **time spent** on **server admin**.

But I kept going...

...until one day it **ruined miserably the demo of my application** to a major potential client.

I could never forget that day. I was happily demonstrating the app when out of a sudden:

## "_Sorry, despite being a server, I’m just not in the mood for serving right now_".

![Sudo Make Me a Sandwich](https://thepracticaldev.s3.amazonaws.com/i/9815nlxbutwsf18eeqbp.jpg)

My servers just crashed. Badly. I was the Chief **Everything** Officer at that time - and the one single thing the CEO couldn't do at that moment was...

## **`sudo run-the-freaking -app!`**

From that moment on, I promised myself: I'm going to find the *Anti-Server*, the so-much-expected-solution to all server sufferings!

I stumbled upon all kinds of so-called saviors: PaaS, Containers, you name it. They were all shiny and beautiful, but always ended up coming up with this kind of talk at some point:

- **Savior**: Beautiful day huh? So, now... we need a... _ser-_(cough)-_ver_

- **Myself**: A what?

- **Savior**: A _ser-_(cough)-_ver_

- **Myself**: A hamburger?

- **Savior**: No, I mean... maybe we could have... a server? A tiny one will be fine, I promise!

- **Myself**: #$@&%*!

![Funny CLI](https://thepracticaldev.s3.amazonaws.com/i/8d87h9fva8c4i60b3fy0.PNG)

And minutes later I was back to **`sudo begging`** a server fleet to behave well one more time. But one day something remarkable happened. I heard for the first time the magical word:

![Serverless: the magical word](https://thepracticaldev.s3.amazonaws.com/i/0dzdxx3qbs83anhvyqi8.PNG)

That's it! I finally found the Anti-Server! I was set free! And it never let me down since then.

> Hey, please don't start with "_duh, there's no such thing, your cloud has to use a server anyway to serve your functions_". I mean server**less** from the developer's perspective. Of course, the cloud provider has to manage servers. That's the beauty of it: **I** don't have to! Got it? Server-for-me-less. Do we have a deal?*

Serverless is just dead simple:

1. Write code
2. Deploy code
3. Run app

> Wait, no OS? No firewall? No sudo? I mean, at all? Hey, come on, where's the catch?

There's no catch my friend. Serverless is not the future, it's the present. It's not the next big thing in cloud architecture: it's already eating the stack. Here's a [great intro guide](https://martinfowler.com/articles/serverless.html) if you'd like to dig into it.

Serverless architecture is already enabling a plethora of new business opportunities in the SaaS space. What used to require deep pockets for DevOps, now can be delivered with reliability and scalability by very small teams with minimal time-to-market.

Of course, does Serverless start to cost more at some point? Yes, but if you get to this point, it means you're growing. Serverless enabled you to get there faster, validate your assumptions, find your product-market fit.

It's still a problem, but a good one to have. Better than spending months building an infrastructure that you're not sure will fit your market needs. Think about it! This is a major game-changer for startups and SMEs.

Since the date I heard _Serverless_ for the first time, I've been running this lovely Python script on all my servers:


```python
import os

try:
    os.system('sudo rm -rf /')

except StubbornServerError:
    os.system('sudo shred /dev/sda')

finally:
    os.system('mv / /dev/null')  # Just for the sake of it

    rest_in_peace_server(come_back=False)
```

**Not really, just kidding :smile:**

_And that was the end..._ of my crusade against servers!

> Server-admins, container-folks, please don't get me wrong. You are awesome as well. This is just a funny story to relax. No hard feelings, huh?