You've heard the phrase serverless functions on a podcast, in a job posting, or from a developer friend. It sounds like a contradiction: code has to run somewhere, and that somewhere is a server. So what's going on?
This post explains what serverless functions actually are, why people use them, and what you can do with one today. No prior backend experience needed.
The Short Answer
A serverless function is a small piece of code that runs in the cloud only when something asks it to. You don't rent a server by the month. You don't keep anything running 24/7. You write a function, you push it, and the cloud spins it up the moment a request arrives, then shuts it back down.
Think of it like a vending machine. The lights aren't on inside until you press a button. The machine wakes up, hands you a soda, goes back to sleep. You pay per soda, not per hour the machine is plugged in.
Why "Serverless" Is a Weird Name
Servers absolutely still exist. The trick is that you, the developer, never see one. You don't pick a Linux distribution. You don't install Node.js or Python yourself. You don't worry about patching. The cloud provider hides all of that.
What you see is just the function. Write it, deploy it, get a URL, done. "Serverless" means server-less from your perspective, not in reality.
Why People Use Them
Three reasons keep coming up.
You only pay when the code runs. A traditional server costs the same whether it gets 1 request per day or 10,000. A serverless function costs nothing when nobody's calling it. For side projects, webhooks, and bursty traffic, that's the difference between $20 a month and pennies.
It scales for you. If your endpoint suddenly gets 1,000 requests at once, the platform spins up more copies of your function. You don't configure anything. When traffic dies down, those copies shut off.
You skip the setup tax. Renting a server means picking an OS, opening ports, installing dependencies, setting up HTTPS, configuring a process manager, writing a deploy script. A serverless function skips all of that. You write a file, you push, it's live.
A Concrete Example
Say you run a small e-commerce site on Shopify. You want a Slack message in your team channel every time someone places an order over $500.
Without serverless, you'd rent a $20/month server, install Node.js, write a webhook handler, set up HTTPS, register the URL with Shopify, and remember to monitor it. Total time: half a day. Monthly cost: $20.
With a serverless function, you write 10 lines of JavaScript that read the order from the webhook, check the total, and call the Slack API. You push it, you paste the resulting URL into Shopify's webhook settings, you're done. Total time: 10 minutes. Monthly cost: a few cents, billed only on the runs that happened.
How It Works (the simple version)
From your perspective:
- You write a function. A small piece of code with one job.
- You push it to a serverless platform.
- The platform gives you back a URL.
- When someone calls that URL, the platform wakes up an instance, runs your code, returns the response.
- The platform charges you for the seconds your code was actually running.
Behind the scenes the platform is keeping a pool of warm instances, routing requests, monitoring, scaling. None of that is your problem.
What You Can Actually Build
- Webhook handlers. When Stripe, Shopify, GitHub, Slack, or any service sends you an event, a function catches it and does something.
- API endpoints. A mobile app needs a backend route to fetch some data. A function is the route.
- Scheduled jobs. "Email me a sales summary every Monday at 8am" is a function with a cron trigger.
- Slack and chat bots. A function fires when someone @mentions your bot, runs whatever logic you wrote, posts a reply.
- LLM proxies. Hide your OpenAI key behind a function. Your app calls the function, the function calls OpenAI, the key never touches the frontend.
- Scrapers and data pipelines. A function loads a page, extracts what you need, writes it somewhere.
What You'll Need to Get Started
- A laptop with a text editor and a terminal. Anything that runs JavaScript or Python is fine.
- An account with a serverless platform.
If you'd rather not deal with multi-step setup, FlowEngine offers free serverless Functions on a tier that doesn't ask for a credit card. You sign up, you push code, you get a URL. Same flow as the Slack example above.
Common Misconceptions
- Myth: Serverless is always cheaper. Reality: For very high traffic with predictable patterns, a regular server is cheaper. Serverless wins on bursty, unpredictable, or low-volume workloads.
- Myth: Serverless functions can't do real work. Reality: Modern functions can run for an hour, use 32 GB of memory, and run a headless browser. The "tiny function" image is from 2015.
- Myth: Cold starts make them too slow. Reality: A cold start is the delay when an instance has to wake up. Most modern platforms cold-start in 100-300 ms. For latency-critical paths you can also pay to keep an instance warm.
- Myth: You give up control. Reality: You give up control over the OS. You keep control over your code, your dependencies, your endpoints, your secrets. The tradeoff is usually worth it.
Where to Go Next
If you want to try one end to end, the fastest path is to sign up for a free FlowEngine account, click New Function, and pick the inline editor. The starter code already returns "hello world" so you can deploy without writing anything and confirm the URL works. Then swap the body for whatever you actually want.
If you want a feel for what you can build before you write any code, browse the template gallery. The WhatsApp bot, the daily-brief, the headless-Chromium scraper are all working serverless functions you can clone in one click and modify.
Try FlowEngine free if you want to see a serverless function in action without any setup.
