Fastly Engineer Interview Questions for Freshers (2027)

44 Fastly interview questions for freshers: CDN basics, services and versions, VCL vs Compute, cache headers, purging and simple scenarios.

Sep 30, 2025 - 17:21
Nov 11, 2026 - 15:27
 0  75
Fastly Engineer Interview Questions for Freshers (2027)

Fastly engineer interview questions for freshers check whether you understand how a CDN caches and serves HTTP traffic, what a Fastly service and its versions are, how VCL and Fastly Compute differ, and how to read cache headers, purge content and spot a cache miss. This page answers 44 beginner questions in plain language.

This set is for students, career switchers and junior DevOps or support engineers meeting Fastly for the first time. If you already run Fastly in production, the Fastly FAQs asked in DevOps interviews page goes further into shielding, Next-Gen WAF and multi-CDN design, and the Fastly interview preparation guide gives you a week-by-week study plan. For the wider question bank, start at the 200+ DevOps interview questions hub.

Key takeaways

  • Learn HTTP first. Most beginner Fastly questions are really questions about status codes, headers, TTLs and the Cache-Control family.
  • Know the vocabulary: service, version, backend (origin), domain, POP, hit, miss, pass, purge, surrogate key.
  • VCL is Fastly's configuration language based on Varnish; Fastly Compute runs your own code compiled to WebAssembly. Freshers should be able to say when each is used.
  • Service versions are immutable once activated. You clone, edit, validate and activate, and rollback means activating an older version.
  • Be ready to read a response and tell whether it came from cache, using headers such as X-Cache and Age.
  • Scenario questions at this level are simple: stale content after a deploy, a 503 from the origin, a site that never caches.

How the questions are organised

SectionQuestionsWhat it tests
Web and CDN basics1 to 12HTTP, caching, why a CDN exists
Fastly building blocks13 to 24Services, versions, backends, VCL, Compute
Caching and purging (early career, up to 2 years)25 to 34TTLs, cache keys, purge types, headers
Tools and first-week tasks35 to 38Web UI, CLI, API, Terraform
Beginner scenarios39 to 44Simple troubleshooting you can talk through

Web and CDN basics

1. What is a CDN?

A content delivery network is a set of servers placed in many locations that cache and serve content close to users. Requests are answered from a nearby server instead of travelling all the way to your origin, which cuts latency and origin load.

2. What is Fastly?

Fastly is an edge cloud platform. It provides CDN caching, edge compute, security products such as a WAF and DDoS protection, and observability features like real-time stats and log streaming. You configure it through a web UI, an API, a CLI or Terraform.

3. What is an origin?

The origin is the server that holds the real copy of your content, for example a web app on EC2, an object storage bucket or a Kubernetes ingress. Fastly calls origins "backends".

4. What is a POP?

A point of presence is a Fastly data centre location in its global network. A user's request is routed to a nearby POP, and that POP either serves from cache or fetches from the backend.

5. What does "edge" mean?

The edge is the part of the network closest to the user, outside your own data centre or cloud region. Running logic "at the edge" means it runs in the CDN's POPs before traffic reaches your origin.

6. What is a cache hit and a cache miss?

A hit means the POP already had a fresh copy and answered without contacting the origin. A miss means it did not, so it fetched the object from the backend, returned it and possibly stored it for later requests.

7. What is a "pass" in Fastly?

A pass tells Fastly to send the request to the backend and not cache the response. You pass for content that must never be shared, such as a logged-in user's account page.

8. What does the Cache-Control header do?

It tells caches how to treat a response. max-age sets how long a browser or shared cache may keep it, s-maxage applies only to shared caches, private forbids shared caching and no-store forbids storing at all. The rules are defined in RFC 9111.

9. What is a TTL?

Time to live is how long a cached object is considered fresh. After the TTL expires the cache treats the object as stale and must revalidate or refetch it.

10. What is the Age header?

Age shows how many seconds the response has been in a cache. A value of 0 or a missing header on repeated requests is a hint that the object is not being cached.

11. Which HTTP status codes should a CDN engineer know?

At minimum 200, 301 and 302 redirects, 304 Not Modified, 403, 404, 429 Too Many Requests, 500, 502, 503 and 504. A 503 from Fastly often means the backend could not be reached or was marked unhealthy.

12. Why does TLS matter for a CDN?

Browsers connect to the CDN over HTTPS, so the CDN terminates TLS with a certificate for your domain. Fastly can manage certificates for you, and it can also use TLS when it connects to your backend.

Fastly building blocks

13. What is a Fastly service?

A service is the unit of configuration: the domains it answers for, its backends, caching rules, logging endpoints and either VCL or a Compute package. Fastly has two service types: Delivery (VCL) services and Compute services.

14. How do service versions work?

Each change goes into a new version. An activated version is locked, so you clone it, edit the clone, validate it and activate it. To roll back you activate a previous version, which takes effect across the network quickly.

15. What is a domain in a Fastly service?

It is a hostname, such as www.example.com, that the service answers for. You point the hostname at Fastly with a DNS CNAME (or the records Fastly gives you for apex domains) so traffic reaches the right service.

16. What is a backend?

A backend is the address of an origin server plus settings such as port, TLS, timeouts and an optional health check. A service can have several backends and choose between them with rules.

17. What is VCL?

Varnish Configuration Language is a domain-specific language Fastly uses for Delivery services. You write logic in subroutines that run at fixed points in the request lifecycle, such as when a request arrives or before a response is delivered.

18. Name the main VCL subroutines.

vcl_recv (request received), vcl_hash (build the cache key), vcl_hit, vcl_miss, vcl_pass, vcl_fetch (backend response received), vcl_error, vcl_deliver (before sending to the client) and vcl_log.

19. Show a simple VCL snippet that sets a header.

sub vcl_deliver {
  set resp.http.X-Served-By-Edge = "yes";
}

In the Fastly UI you would usually add this as a VCL snippet rather than replace the whole generated VCL.

20. What is Fastly Compute?

Compute lets you write edge code in a supported language, compile it to WebAssembly and run it on Fastly's network for each request. Fastly publishes official SDKs for Rust, JavaScript and Go.

21. VCL or Compute: how would a beginner choose?

Use VCL when you need caching rules, redirects, header changes and routing that VCL already covers. Use Compute when you need general-purpose code, libraries, or logic that is awkward in VCL, such as complex request transformation.

22. What are edge dictionaries?

Edge dictionaries are key-value tables attached to a VCL service. You can change their entries without creating a new service version, which is handy for redirect maps or feature flags.

23. Which data stores does Compute offer?

Compute services can read from a Config Store for small configuration values, a KV Store for larger data and a Secret Store for credentials, so secrets do not live in the code package.

24. What is a health check in Fastly?

A health check makes Fastly poll a URL on the backend at intervals. If enough checks fail, Fastly marks the backend unhealthy and can stop sending traffic to it or fall back to another backend.

Caching and purging (early career, up to 2 years)

25. How does Fastly decide how long to cache something?

It looks at response headers from the backend. Surrogate-Control takes priority, then Cache-Control (s-maxage before max-age), then Expires. With none of these, Fastly applies the service's default TTL, which is one hour unless you change it.

26. What is Surrogate-Control?

A header aimed only at the CDN. Fastly reads it and removes it before the response goes to the browser, so you can cache at the edge for a day while telling browsers to cache for a minute.

27. What is a cache key?

The value used to look up an object in cache. By default it is built from the host and URL. If the key includes something that changes per user, such as a session query parameter, the hit ratio drops.

28. What is a purge?

A purge removes or invalidates cached content so the next request goes to the backend. Fastly can purge a single URL, all objects tagged with a surrogate key, or everything in a service.

29. What are surrogate keys?

Tags the backend sends in a Surrogate-Key response header, for example product-42 category-shoes. Purging the key product-42 invalidates every page that carries it.

30. Hard purge versus soft purge?

A hard purge removes the object. A soft purge marks it stale, so Fastly can still serve it while it fetches a fresh copy or if the origin fails. Soft purges protect the origin from a sudden flood of requests.

31. How can you check if a response came from cache?

Look at X-Cache (HIT or MISS), X-Cache-Hits, Age and X-Served-By. Sending the request header Fastly-Debug: 1 adds more debug headers to the response.

curl -sI -H "Fastly-Debug: 1" https://www.example.com/ | grep -i -E "x-cache|age|x-served-by"

32. Why might a page never be cached?

Common causes are a Set-Cookie header on every response, Cache-Control: private or no-store from the origin, a VCL rule that passes the request, or a cache key that differs per request.

33. What is the Vary header and why be careful with it?

Vary tells caches to store separate copies per value of a request header. Vary: Accept-Encoding is fine; Vary: User-Agent creates many copies and lowers the hit ratio.

34. What does serving stale mean?

Serving an expired object for a short time instead of failing. stale-while-revalidate allows stale content while Fastly refreshes it in the background, and stale-if-error allows it when the origin returns errors.

Tools and first-week tasks

35. What can you do in the Fastly web interface?

Create and edit services, clone and activate versions, add backends and domains, purge content, set up logging and view real-time and historical stats.

36. What is the Fastly CLI used for?

It manages services, purges and Compute projects from a terminal. For Compute, fastly compute init creates a project, fastly compute serve runs it locally and fastly compute publish builds and deploys it.

fastly compute init
fastly compute serve
fastly compute publish

37. How do you call the Fastly API safely?

Use an API token with only the scopes and services the task needs, pass it in the Fastly-Key header, and store it in a secrets manager or CI secret, never in a repository.

38. Can Fastly be managed with Terraform?

Yes. The official fastly/fastly provider manages services, backends, domains, VCL snippets and logging, so changes go through code review like any other infrastructure.

Beginner scenarios

39. You deployed new CSS but users still see the old style. What do you check?

Confirm the new file is on the origin, then check cache headers. Purge the URL or its surrogate key. For the long term, use versioned file names such as app.3f2a.css so a deploy never depends on a purge.

40. The site returns 503 from Fastly. Where do you start?

Check whether the backend is up and reachable from the internet, whether its health check is failing, and whether TLS settings (hostname, certificate) match. The error body and logs usually say if the backend timed out or refused the connection.

41. A new version broke redirects. What is the fastest fix?

Activate the previous version to restore service, then compare the two versions in the UI to find the change before trying again.

42. The hit ratio is low on a static site. What would you look at?

Cookies on static responses, query strings in the cache key, short TTLs and Vary headers. Fixing these usually raises the hit ratio without code changes.

43. A user in one country sees an error but your test works. How do you investigate?

Ask for the response headers, especially X-Served-By, to learn which POP served them. Check the Fastly status page and your logs filtered by that POP.

44. A colleague asks you to purge everything. What do you say?

Ask what changed first. Purge all can send every request to the origin at once. A targeted purge by URL or surrogate key, or a soft purge, is usually safer.

How to prepare

  • Create a free Fastly account, add a test origin and use curl -I to watch headers change between hits and misses.
  • Read the VCL subroutine documentation once end to end, then write two snippets: one that sets a header and one that redirects.
  • Build a "hello world" Compute app in Rust, JavaScript or Go and run it locally with fastly compute serve.
  • Revise HTTP caching from RFC 9111; it explains most of the answers above.
  • Compare CDN concepts across vendors with our Cloudflare engineer interview questions and Akamai interview questions.
  • If you want structured practice with Linux, networking, CI/CD and cloud alongside CDN topics, see the DevOps training course (classroom in Kharadi, Pune, and live online).

FAQ

Do freshers need to know VCL for a Fastly interview?

You should know what VCL is, its main subroutines and how to write a simple snippet. Deep VCL is expected only for roles that maintain Delivery services daily.

Which languages does Fastly Compute support?

Fastly provides official SDKs for Rust, JavaScript and Go. Code is compiled to WebAssembly and runs on Fastly's edge.

What is the default cache TTL in Fastly?

If the backend sends no caching headers, Fastly uses the service's default TTL, which is one hour (3600 seconds) unless you change it.

What is the difference between a hard and a soft purge?

A hard purge deletes the cached object. A soft purge marks it stale so Fastly can keep serving it while it fetches a fresh copy.

How do I know if Fastly served a page from cache?

Check the X-Cache header for HIT or MISS and the Age header. Adding the Fastly-Debug: 1 request header returns extra debug headers.

How is this page different from the Fastly FAQs page?

This page covers beginner concepts for freshers. The FAQs page targets working engineers and goes deeper into shielding, WAF, multi-CDN and senior scenarios.

Official references

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.