Fastly Compute and Edge Interview Questions (2027)
36 Fastly edge interview questions on Compute, Wasm SDKs, fastly.toml, Viceroy, KV, Config and Secret stores, dynamic backends, rate limiting and logging.
Fastly CDN and edge interviews now go past VCL caching into Fastly Compute: WebAssembly packages built with the Fastly CLI, the fastly.toml manifest, local testing with Viceroy, edge data in KV, Config and Secret stores, dynamic backends, edge rate limiting, log streaming and the Next-Gen WAF. This page has 36 questions on that edge platform.
Our other Fastly pages already cover VCL subroutines, purging and shielding in depth, so this one concentrates on building and running code at the edge. For the VCL and caching core, read real-time Fastly interview questions. For a study schedule, use the Fastly interview preparation guide, and for incident drills, scenario-based Fastly interview questions. Facts here were checked against fastly.com/documentation in November 2026.
Key takeaways
- Fastly runs two kinds of services: CDN services configured with VCL, and Compute services that run your code compiled to WebAssembly on Wasmtime.
- Fastly publishes official Compute SDKs for Rust, JavaScript, Go and C++. You can also bring your own Wasm binary or use a community SDK.
- The CLI workflow is
fastly compute init,build,serve(local, Viceroy, default 127.0.0.1:7676), thenpublishordeploy. - Config Store is for small read-mostly configuration, KV Store for larger data you update at runtime, and Secret Store for small sensitive values.
- Fastly's backend guide says Compute does not support automatic load balancing or shielding, and dynamic backends are a Compute feature. Expect design questions on what that means for origin protection.
VCL services and Compute services compared
| Topic | CDN service (VCL) | Compute service |
|---|---|---|
| Logic | Fastly VCL in fixed subroutines | Your program compiled to Wasm |
| Languages | VCL only | Rust, JavaScript, Go, C++ official SDKs; bring your own Wasm |
| Local testing | Fastly Fiddle and staging versions | fastly compute serve with Viceroy |
| Backends | Static, with shielding and load balancing | Static, plus dynamic backends registered at runtime |
| Logging | log statements, usually in vcl_log | SDK API writes to a named log endpoint |
| Edge data | Edge dictionaries and other VCL features | KV Store, Config Store, Secret Store |
Questions for freshers
1. What is edge computing in the context of a CDN?
Running request handling logic in the CDN's points of presence, close to users, instead of in a central origin. The CDN can then decide routing, authentication, personalisation and caching without a round trip to the origin.
2. What is Fastly Compute?
Fastly's platform for running your own code at the edge. You write a program with a Fastly SDK, compile it to WebAssembly, and Fastly runs it on its network with the Wasmtime runtime for each request.
3. Why does Fastly use WebAssembly for Compute?
Fastly's getting-started guide gives security and portability as the reasons. Wasm code runs in a sandbox with no access to the host except through the interfaces the runtime provides, and the same package runs anywhere the runtime does.
4. Which languages can you use?
Fastly lists official SDKs for Rust, JavaScript, Go and C++. The fastly compute init prompt also offers a "bring your own" Wasm binary option for other languages.
5. What does fastly compute init do?
It creates a new project, asking for a language and a starter kit, and writes the source files and a fastly.toml manifest.
6. What is fastly.toml?
The package manifest. It holds the manifest version (currently 3), project name, language, the build script under [scripts], an optional service_id, settings for the local server, and an optional [setup] section that tells the CLI which resources to create on first deploy.
manifest_version = 3
name = "edge-router"
language = "rust"
service_id = "SU1Z0isxPaozGVKXdv0eY"
[scripts]
build = "cargo build --profile release --target wasm32-wasip1"
[local_server.backends.origin]
url = "http://127.0.0.1:8080/"
The service ID above is a placeholder. The build command must produce bin/main.wasm; starter kits set this up for you.
7. How do you test a Compute package locally?
Run fastly compute serve. It builds the package and runs it in Viceroy, Fastly's local runtime, listening on 127.0.0.1:7676 by default. Backends and stores for local runs are defined under [local_server] in fastly.toml.
8. What is the difference between fastly compute publish and deploy?
build compiles the package, deploy uploads it to a Fastly service and activates it, and publish runs build and deploy together.
9. What is a backend?
An origin server that Fastly fetches from when it cannot answer from cache or from code. In Compute code you send a request to a backend by name.
10. Where does Compute code send its logs?
To named log endpoints, through the SDK's logging API. You create the endpoint (for example HTTPS, Syslog, Kafka, Amazon S3, Datadog or Splunk) in the service configuration. During development, fastly log-tail streams Compute output to your terminal.
Questions for 2 to 5 years of experience
11. What does a minimal Rust Compute handler look like?
A function marked with the SDK's main attribute that takes a request and returns a response, here forwarding to a backend named origin:
use fastly::{Error, Request, Response};
#[fastly::main]
fn main(req: Request) -> Result<Response, Error> {
if req.get_path() == "/health" {
return Ok(Response::from_body("ok"));
}
Ok(req.send("origin")?)
}
Rust Compute builds target wasm32-wasip1.
12. When do you use Config Store, KV Store and Secret Store?
Fastly's data store guide describes Config Store for small configuration data read on every request and rarely changed, KV Store for larger, non-sensitive objects that you update at runtime, and Secret Store for small sensitive values such as API keys. All three are shared across Compute services in an account.
13. What consistency should you expect from edge data stores?
Fastly describes edge-stored data as durable and eventually consistent. Do not design flows that need a write to be visible at every POP immediately, such as one-time tokens, without a check at the origin.
14. Why not put secrets in a Config Store?
Fastly's data store guide positions Config Store for configuration and Secret Store for small, sensitive data. Keeping credentials in the Secret Store separates who can read configuration from who can read secrets, and keeps keys out of places people browse freely.
15. What is a dynamic backend?
A backend registered at runtime from Compute code instead of declared in the service configuration. It helps when the origin is chosen per request, for example per tenant. Fastly notes that free accounts may need to contact support to enable it. Validate hostnames against an allow list so a user cannot make your edge fetch arbitrary hosts.
16. What TLS settings matter when connecting to an HTTPS origin?
Fastly's backend guide warns that by default the client-forwarded hostname may be used for SNI. Set the address, override host, SNI hostname and certificate hostname to the backend's hostname. The fastly backend create command does this for you; via the API or UI you set them one by one.
17. How does Compute affect your origin protection design?
The backend guide states that Compute does not support automatic load balancing or shielding. If you need shielding or pooled origins, a common pattern is to put a VCL CDN service in front of or behind the Compute service, or to implement failover logic in code. Confirm current options with Fastly docs for your account before you design around either.
18. How do you pass configuration to local tests?
Under [local_server], define config_stores with format = "inline-toml" or a JSON file, kv_stores with a JSON file or array of entries, and secret_stores, which can read values from environment variables so secrets are not committed.
19. How do you deploy Compute from CI?
Install the Fastly CLI in the pipeline, authenticate with an API token stored as a CI secret, run tests, then fastly compute build and fastly compute deploy against the service ID in fastly.toml. Use a staging service first. Our CI/CD tools for edge computing page compares pipeline options.
20. How do you unit test Compute code?
Fastly's getting-started guide lists Viceroy 0.15.0 or newer as required for running unit tests. Tests run against the local runtime, so SDK calls behave like they do at the edge.
21. What is Edge Rate Limiting?
A Fastly feature that limits how fast clients can send requests to your origins. A rate counter tracks requests per client over a window of 1, 10 or 60 seconds, and when a client exceeds the limit, a penalty box logs the event and blocks further requests for a period. Fastly lists support in VCL and in Compute for Rust, Go and JavaScript.
22. Why choose a short rate counter window over a long one?
A short window detects bursts faster. A long window smooths out spikes and catches steady abuse more accurately. Pick based on the attack you expect and test with replayed traffic.
23. How does logging differ between VCL and Compute?
In VCL, log statements usually sit in vcl_log, which runs after the response is delivered, and each message must be one line. Compute has no automatic log generation; your code writes to a named endpoint through the SDK.
24. What is the Fastly Next-Gen WAF and how does it work with Compute?
Fastly's web application firewall. In an edge deployment, a security service runs on Fastly's network and your service sends requests to it for inspection. Fastly's changelog from September 2024 announced edge WAF support for Rust Compute projects, and its tutorial shows enabling it from a Rust project.
Senior questions
25. When should logic go in Compute and when in VCL?
VCL suits caching rules, header changes and routing that fit its subroutine model, and it has mature shielding and load balancing. Compute suits logic that needs a general programming language: complex auth, request signing, A/B assignment, API composition, or calls to edge data stores. Many teams keep caching in VCL and add Compute where code is needed.
26. How do you keep Compute packages fast?
Keep the Wasm binary small, avoid heavy work on every request, read Config Store values instead of calling origins for configuration, and cache backend responses. Measure with real traffic in a staging service rather than guessing.
27. How do you design multi-tenant routing at the edge?
Store tenant-to-origin mappings in Config Store or KV Store depending on size and update rate, look up the tenant by host header, and send to a static backend or a validated dynamic backend. Keep a default route and alert when lookups fail.
28. How do you roll out a risky Compute change?
Deploy to a staging service, then to production with a feature flag in Config Store so you can turn the new path off without redeploying. Keep the previous service version ready to reactivate and watch error rates and logs during the rollout.
29. How do you handle secrets rotation?
Store the new secret in Secret Store alongside the old one, update code to accept both during the change, switch callers, then remove the old one. Never log secret values, and check that log endpoints do not capture headers that carry them.
30. What observability do you set up for an edge service?
Stream structured logs to a central system, track request rate, error rate, latency and cache hit ratio from Fastly's real-time stats, and alert on spikes in rate-limit blocks or WAF events. Correlate edge logs with origin logs using a request ID header.
Scenario questions
31. A Compute deploy works locally but returns 503 in production.
Check that the backend names in code match the backends on the production service, that TLS settings (SNI, certificate hostname) match the origin, and that any store the code opens exists and is linked to the service. Local runs use [local_server] definitions, which can hide missing production resources.
32. A configuration change made in Config Store is not taking effect everywhere.
Edge data is eventually consistent, so allow time for propagation. Confirm the store is linked to the right service and that the code reads the key you changed. If the change needs to be instant, add a version key and compare it.
33. A bot is hammering the login endpoint through the edge.
Add an Edge Rate Limiting policy on the login path with a short window and a penalty box, log blocked clients, and enable WAF rules for credential stuffing if you use the Next-Gen WAF. Review the logs to tune the threshold so real users are not blocked.
34. Logs from a Compute service are missing in the log platform.
Check that the endpoint name in code matches the configured endpoint, that the endpoint's credentials and destination are valid, and use fastly log-tail to confirm the service is writing output at all.
35. An origin is overloaded after moving traffic from a VCL service to Compute.
The VCL service may have used shielding and caching that the Compute service does not reproduce. Add caching of backend responses in code, check that Compute is not bypassing cache on every request, and consider keeping a VCL service with shielding in the path.
36. A dynamic backend feature is flagged in a security review.
Show that hostnames are checked against an allow list, that internal or metadata addresses cannot be reached, and that TLS certificate checks are on. Add tests for blocked hosts and log every rejected attempt.
How to prepare
Install the Fastly CLI, run fastly compute init with a Rust or JavaScript starter, and build a small router that reads a Config Store value and forwards to one of two local backends. Add a test, a log endpoint and a rate limit. Then explain what you would change for production. Combine this with the caching material in Fastly FAQs asked in DevOps interviews, and compare with another CDN in Akamai CDN interview questions. CDN work sits inside wider delivery pipelines, which our DevOps training in Pune covers in Kharadi and live online.
FAQ
What is the difference between Fastly VCL and Fastly Compute?
VCL services are configured with Fastly's Varnish Configuration Language in fixed subroutines. Compute services run your own program compiled to WebAssembly, written with SDKs for Rust, JavaScript, Go or C++.
Which language should I learn for Fastly Compute?
Rust is used in many of Fastly's Compute examples, and Next-Gen WAF edge deployment on Compute is documented for Rust projects. JavaScript is easier if you come from web development. Check the docs for the features you need, because support differs by SDK.
How do I run Fastly Compute locally?
Use fastly compute serve. It builds the package and runs it in Viceroy on 127.0.0.1:7676 by default, with backends and stores defined in the local_server section of fastly.toml.
What are Fastly KV Store, Config Store and Secret Store?
Edge data stores for Compute. Config Store holds small configuration read on every request, KV Store holds larger data you update at runtime, and Secret Store holds small sensitive values. Data is eventually consistent.
Does Fastly Compute support shielding?
Fastly's backend guide states that Compute does not support automatic load balancing or shielding. Teams that need shielding often combine Compute with a VCL service or write failover logic in code.
What is Fastly Edge Rate Limiting?
A feature that counts requests per client over 1, 10 or 60 second windows and puts clients that exceed the limit in a penalty box, blocking them for a time. It works in VCL and in Compute for Rust, Go and JavaScript.
Official references
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0