Build the mental model
"Serverless" is a misleading name — servers still exist and still run the code. What changes is who manages them: the platform provisions, patches, and scales instead of you.
A developer supplies a function; the platform runs it on demand, scales instances automatically, and bills based on actual usage rather than idle server time. That pay-per-use model is one of serverless's biggest appeals.
- Cold start: delay the first time a function runs after being idle, while the platform initializes it
- Execution time and resource limits exist, but vary by provider and change over time — check current docs, don't memorize numbers
Edge computing runs code at many locations physically closer to users instead of one central place, cutting network distance — though not every workload benefits if it still has to wait on a slow round trip to a central database.
SERVERLESS AND EDGE COMPUTING
-----------------------------
Request --> [ Function runs on-demand ] --> Response
(platform manages the servers)
TRADITIONAL SERVER VS EDGE LOCATION
-------------------------------------
User (Yangon) ----------------> Server (far away region)
(long trip, slower)
User (Yangon) --> Edge Location (nearby) --> Response
(short trip, often faster)Connect it to a real scenario
Reach for serverless when a workload is bursty or doesn't justify a server running continuously — occasional webhook events, resizing an uploaded image, a task that runs once a day.
It fits less well for a persistent connection, a very long-running job, or every-request low latency, since a cold start introduces an occasional delay an always-on server wouldn't have.
Edge computing is worth reaching for when a request can be answered using only what's available nearby — a cached response, an auth header check. It offers less for logic that must read fresh data from one central database every call.
This lesson stays at the concept level on purpose — writing, deploying, and wiring an actual Lambda function is covered hands-on in this site's AWS Fundamentals tutorial.
Serverless does NOT mean no servers
Physical servers still run every serverless function — the name refers to the fact that YOU never provision, patch, or manage them, not that they've disappeared. The cloud provider still owns and operates real machines underneath.
Try the working example
// Illustrative only: shows the SHAPE of a serverless function handler,
// not a real deployed function on any specific platform.
function handler(request) {
return { status: 200, body: `Hello, ${request.name}!` };
}
console.log(handler({ name: "Aye" }));
console.log(handler({ name: "Ko Ko" }));{ status: 200, body: 'Hello, Aye!' }
{ status: 200, body: 'Hello, Ko Ko!' }5-minute try-it
Modify the handler function to also accept a request.locale field, and return a Burmese or English greeting depending on its value — call it twice with different locales and confirm the responses differ correctly.
One important caution
Assuming a serverless function can hold state between invocations in memory — each invocation may run on a fresh instance.
Choosing serverless for a workload that runs constantly at high volume, where a traditional always-on server may end up cheaper.
Serverless Computing — Wikipedia — Cloud & Deployment