Edge Stage — DevOps

Run a village dangdut contest's site at the edge: a Worker, a photo bucket, logs, traces, alerts. 16 levels, right in the browser.

What you learn in this game

An edge function runs on a server close to the person using it, not on one central server. On Cloudflare Workers a file exports an object with a fetch(request, env, ctx) method: each request arrives as a Request, and what comes back must be a Response. In Panggung Tepi, Mr. Bondan's function runs on workerd, the runtime Cloudflare Workers runs on, and the phones really request it.

An edge function can run as many instances at once, and an instance can be stopped at any time. So the function is treated as stateless: anything that has to be remembered across instances is kept outside them, in KV, D1 or a Durable Object. In this level the two gates are two workerd instances running the same file.

A feature flag separates deploying from releasing: the new code is already live but shows only to some users, and it can be switched off without a new deploy. A percentage rollout sorts users into buckets 0 to 99; those whose bucket is under the percentage get the new feature. In this level the flag lives in KV and is read by two workerd instances.

Object storage (S3, R2, GCS) keeps files as objects in a bucket, each with a unique key such as foto/sari/a1b2.jpg. There are no real folders: the slash is just part of the key. A presigned URL is a short-lived address the server signs, which the phone uses to upload straight to the bucket. In Panggung Tepi the bucket runs on RustFS, a server that speaks the S3 API, and the URLs come from the AWS SDK for JavaScript.

A structured log is written as data, usually one JSON line per event, not as sentences. Fields such as req, rt or level can be filtered and counted by a machine. In this level the committee API logs with pino on Node, and what counts is the lines pino really wrote.

A trace is the path of one request; a span is one step of it, with its parent span. OpenTelemetry records spans in each service and sends them to a Collector. In Panggung Tepi both services use the OpenTelemetry Node SDK sending OTLP to the OpenTelemetry Collector, and what counts is the spans the Collector received.