What Is Serverless?
Serverless computing doesn't mean "no servers" - there are always servers somewhere. It means you don't think about them. The cloud provider handles infrastructure; you just run code.
The Traditional Model
Traditionally, running an application meant: 1. Estimate how much traffic you'll get 2. Provision servers to handle it 3. Pay for those servers 24/7, even when idle 4. Manage operating systems, patches, scaling 5. Pray your estimates were right
Over-provision and you waste money. Under-provision and your site crashes during traffic spikes.
The Serverless Model
With serverless: 1. Upload your code 2. It runs when triggered (HTTP request, file upload, scheduled time) 3. Pay only for actual execution time 4. Scaling happens automatically
No capacity planning. No server management. The code runs when needed and costs nothing when idle.
Types of Serverless
Functions as a Service (FaaS) - Run individual functions in response to events. AWS Lambda, Google Cloud Functions, Azure Functions. The purest serverless.
Backend as a Service (BaaS) - Complete backends without code. Authentication, databases, storage. Firebase, Supabase.
Serverless containers - Run containers without managing servers. AWS Fargate, Google Cloud Run.
Serverless databases - Databases that scale automatically and charge per query. DynamoDB, Aurora Serverless, BigQuery.
When Serverless Shines
Unpredictable traffic. Spiky workloads that go from zero to thousands of requests and back. Why pay for idle servers?
Event-driven processing. Something happens, run some code. File uploaded? Process it. Form submitted? Send an email.
Scheduled tasks. Run a cleanup job every night. Don't maintain a server just for a 5-minute task.
Microservices. Each function does one thing. Easy to deploy, scale, and update independently.
Startups and prototypes. Get running fast without infrastructure decisions. Optimize later.
When Serverless Doesn't Fit
Predictable, constant workloads. If you're running 24/7 at consistent load, traditional servers may be cheaper.
Long-running processes. Lambda functions timeout after 15 minutes. Not suitable for hours-long jobs.
Specific hardware needs. GPUs, large memory, custom configurations - not serverless territory.
Low latency requirements. Cold starts (first run after idle) add latency. Not great for real-time applications.
The Challenges
Cold starts. When a function hasn't run recently, it takes time to spin up. Milliseconds to seconds of delay.
Vendor lock-in. Serverless code is often tied to specific cloud providers. Migration is painful.
Debugging difficulty. Distributed functions are harder to debug than monolithic applications.
Cost unpredictability. Usage-based pricing can surprise you if traffic spikes unexpectedly.
State management. Functions are stateless. Managing state across invocations requires external services.
Serverless for Data
In data contexts, serverless appears as:
ETL functions - Lambda functions triggered when files land in S3
API endpoints - Serverless APIs fronting data services
Scheduled jobs - Daily dbt runs, weekly reports
Event processing - Stream processing with auto-scaling
Query engines - BigQuery, Athena (pay per query, not for running clusters)
Cost Reality
Serverless economics depend on usage patterns:
Serverless wins: Low/variable usage, spiky traffic, many small tasks Traditional wins: High/constant usage, predictable workloads
The break-even point varies, but rough rule: if your Lambda runs constantly, you'd probably be cheaper on EC2.
Getting Started
If you're exploring serverless:
1. Start with a specific use case - Don't re-architect everything. Pick one function or task.
2. Use managed services - Don't just move code to Lambda. Use DynamoDB instead of self-managed databases. Embrace the model.
3. Think in events - What triggers what? Serverless is event-driven by nature.
4. Monitor from day one - Distributed systems need observability. CloudWatch, X-Ray, etc.
5. Accept some lock-in - Or use abstraction frameworks (Serverless Framework, SAM) to reduce it.
Serverless is one cloud approach. Learn about cloud computing basics and IaaS vs PaaS vs SaaS.
---
Sources: - AWS: Serverless Computing - Cloudflare: What Is Serverless? - Martin Fowler: Serverless Architectures