Questions tagged [fastly]

Fastly is a content delivery network and edge cloud platform used by the latest generation of web services.

The Fastly platform allows you to build and deploy services globally in VCL on top of the Varnish cache server or in WASI-compatible languages such as Rust or AssemblyScript on the Compute@Edge platform.

76 questions
9
votes
2 answers

CDN support/configuration for serving "stale" content, refreshing in background

Goal Always serve content from a CDN EDGE cache, regardless of how stale. Refresh it in the background when possible. Problem I have a NextJS app that renders some React components server-side and delivers them to the client. For this discussion,…
jamis0n
  • 3,610
  • 8
  • 34
  • 50
4
votes
2 answers

How can I adapt my gulp static asset revisioning to work with ServiceWorkers?

Context: I have a production application (here if you want to look) that is currently using static asset revisioning using the gulp-rev-all package which is like gulp-rev except that it also handles dependencies when generating content hashes. It…
MalcolmOcean
  • 2,807
  • 2
  • 29
  • 38
4
votes
1 answer

What will happen if Cache-Control have `no-cache` and `max-age=900`?

What'll happen if I set server response as: Cache-Control: private,no-cache,max-age=900? What'll happen if the header is like: Cache-Control: public,no-cache,max-age=900? Since it has a no-cache whether browser (Or proxy server) consider the…
Asim K T
  • 16,864
  • 10
  • 77
  • 99
4
votes
1 answer

Fastly versus my own hosted Varnish

What are the benefits of using Fastly versus simply having my own self-hosted Varnish? Are there additional benefits and features that Fastly provides that regular Varnish does not, or is it simply that Fastly is managed Varnish in the same way…
jdotjdot
  • 16,134
  • 13
  • 66
  • 118
3
votes
1 answer

How to expose Treafik service status as HTTP endpoint?

I'm using Traefik as a load balancer and I'm trying to write a health check, which will monitor servers within the load balancer service. I have multiple Traefik instances in different locations and a CDN. I need to configure the CDN to check the…
Filip
  • 41
  • 1
  • 5
3
votes
0 answers

How to use .witx definitions for Go code generation to use with TinyGo WebAssembly targeting WASI?

Is it possible to use .witx definition files for Go code generation to use with TinyGo's WebAssembly WASI (WebAssembly System Interface) support? Specifically, I want to create a Fastly Compute@Edge SDK for Go. These SDKs exist for JavaScript,…
Grokify
  • 15,092
  • 6
  • 60
  • 81
3
votes
1 answer

How to declare a variable that persists subroutines

During the recv subroutine I am currently changing my backend to another backend to handle the request, I need to declare a variable that will hold the value for the first/original backend that it was set to, so that when the request is restarted, I…
C. Dodds
  • 325
  • 3
  • 12
3
votes
1 answer

Cloud Run with Fastly or Cloudflare

When I want to map a custom domain to my cloud run services. Is this a one time only thing I need to do via CNAME record? Or is this validated on a continuous basis? I would like to have a CNAME record from Fastly which shield my Cloud Run…
Glenn
  • 61
  • 5
3
votes
2 answers

Are Varnish Hashtwo/Xkey and Fastly's "Surrogate Keys" the same?

I'm currently deciding whether to manage my own Varnish servers or use a hosted service like Fastly. One of the most important decision factors here is efficient tag-based cache invalidation, since I plan to put Varnish in front of our API and we'll…
jdotjdot
  • 16,134
  • 13
  • 66
  • 118
2
votes
0 answers

How to perform Wasm host call from a Go guest?

How can one call custom Wasm host functions from a Go guest? I've looked at a few examples that show loading a self-contained witx/wat/wasm defined function, but haven't found an example for performing a host-defined call. Some examples I've looked…
Grokify
  • 15,092
  • 6
  • 60
  • 81
2
votes
1 answer

How does Fastly Caching know when user session has changed in Magento 2 Commerce

BACKGROUND Magento has the product details page accessible at catalog/product/view/id/{product_id}. It is being hosted on magento cloud so fastly is involved. There are different customer group and each customer group get to see different prices on…
Bob Lee
  • 71
  • 6
2
votes
1 answer

What is the difference between setting cache headers on CDN vs on AWS S3 objects?

I'm trying to figure out how to purge a set of URLs without purging one by one (which is inefficient and buggy). I'm also trying to figure out how to do this without purging content that we don't want purged. Essentially, when I push updated files…
maddie
  • 1,854
  • 4
  • 30
  • 66
2
votes
0 answers

VCL Varnish randomint_seeded and std.strtol in PHP or Javascript

For AB testing purposes we generate a unqiue hash of a user Id into a bucket value in VCL (by Fastly CDN). set var.backResult = randomint_seeded(1, 4, std.strtol( substr( digest.hash_md5(req.http.X-Development-UserId) ,…
Tim
  • 31
  • 1
2
votes
0 answers

Infinity in the request urls

Did anyone had problems with request URLs that finish with Infinity? Happens that our server logs are receiving somehow, someway requests with this pattern. I don't know if is a pattern or any kind of computation that returns an overflow, or if is…
Ricardo Ribas
  • 409
  • 4
  • 14
2
votes
3 answers

Accessing the body of the backend response in Varnish VCL

My Varnish VCL code needs to make a simple GET request into a backend system and decide if the requested resource is accessible or not. Unfortunately, the backend system always returns 200, and I must examine the actual body of the response to…
Yuri Astrakhan
  • 8,808
  • 6
  • 63
  • 97
1
2 3 4 5 6