The Problem with Always-On Servers
The Silva Way is a personal development platform with a classic media traffic pattern: near-zero requests at 3 AM, massive concurrent load when a new course or newsletter drops. A traditional EC2-based backend meant either over-provisioning (expensive and wasteful) or under-provisioning (crashes during the exact moments that matter most).
The brief: build a backend that scales to zero overnight and handles 10,000 concurrent requests during a product launch, without a DevOps team to manage it.
Why Serverless Was the Right Answer
Lambda's pricing model is requests × duration. When nobody is using the platform, the bill is zero. When 10,000 people hit it simultaneously, Lambda scales automatically, no manual intervention, no pre-warming, no capacity planning.
The tradeoffs are real: cold starts, stateless execution, and vendor lock-in. We addressed each one deliberately.
Architecture Decisions
Lambda + API Gateway as the API layer
Every API route maps to a Lambda function. API Gateway handles TLS termination, rate limiting, and request validation before a single line of our code runs. For the three highest-traffic endpoints (login, content fetch, checkout), we added Provisioned Concurrency, Lambda pre-warms those functions so cold starts never affect the user experience on the hot paths.
We also used Lambda Layers for shared dependencies, reducing package size per function and cutting cold start time by ~40%.
DynamoDB for the data layer
RDS would reintroduce the scaling problem Lambda solves, connection pools don't survive serverless concurrency spikes. DynamoDB's on-demand capacity mode scales without configuration and charges per request.
The catch: DynamoDB punishes ad-hoc queries. We modeled every access pattern in a spreadsheet before writing a line of code, then implemented single-table design with composite keys. Every query hits a known index. No table scans.
S3 + CloudFront for media delivery
Course audio and video lives in S3. Lambda generates signed URLs (30-minute expiry) on demand. CloudFront caches content at edge locations, a user in London gets the same low-latency experience as one in New York, served from a datacenter minutes away.
Cost Analysis
After 3 months in production, the average monthly AWS bill was $340, compared to ~$1,200/month for equivalent EC2 capacity. The infrastructure savings paid back the $22,000 development investment within the first year of operation.
What We'd Do Differently
DynamoDB's single-table design is powerful but rigid. Two access patterns changed after launch, requiring a table migration. The lesson: invest more time in access pattern modeling before the first deployment, not after. A spreadsheet of 20 access patterns upfront saves a week of migration work later.
Key Takeaway
Serverless isn't always the right answer, but for platforms with spiky, unpredictable traffic and no dedicated DevOps resources, it eliminates an entire category of scaling problems. The key is designing for the constraints (stateless execution, access pattern modeling, cold start management) before you write code, not after.