Serverless Computing: When and When Not to Use It

📅 November 2, 2018
⏱️ 2 min read

Evaluating serverless vs. containers, cold start challenges, and cost implications.

Serverless removes server management and scales to zero. It is excellent for event-driven workloads, APIs with variable traffic, and glue logic between services. It is a poor default for steady high-throughput systems or workloads with strict latency requirements at cold start.

When Serverless Wins

Infrequent jobs, webhooks, file processing triggers, and prototype APIs. Pay per invocation aligns cost with usage. Managed scaling handles traffic spikes without capacity planning.

When Containers Win

Long-running processes, custom runtimes, predictable baseline load, and teams already standardized on Kubernetes. Containers offer more control over networking, filesystem, and dependencies.

Hybrid Approaches

Many enterprises use both: Kubernetes for core services, functions for event handling. Watch data egress costs and vendor lock-in on proprietary event sources. Abstract critical logic behind interfaces you own.

Choose serverless for operational simplicity at the right scale, not because it is fashionable.

Cost Modeling

Serverless is cheap at low volume and expensive at sustained high volume. Model your expected invocation count, duration, and memory before choosing serverless over containers. The crossover point often surprises teams.

Cold Start Mitigation

Provisioned concurrency, smaller runtimes, and keeping dependencies minimal reduce cold starts. For latency-sensitive APIs, measure P99 cold start impact before committing to serverless.

Common Pitfalls

Adopting tools before defining outcomes leads to expensive experiments without business value. Copying another organization's architecture without understanding your constraints creates fragile systems. Skipping documentation means every new team member relearns lessons the hard way.

Getting Started

Define success metrics before implementation. Start with the smallest scope that proves value. Review results with stakeholders weekly during the first month. Iterate based on evidence, not assumptions.

Topics & Tags
Serverless Lambda Cloud Functions Containers Architecture