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
0
votes
1 answer

Fastly: Route n% of traffic based on a path param

Have an interesting task when I don't want to have a full rollout of a new feature. I'd like to route only the percentage of traffic (based on a path parameter) to the new endpoint. I'd like to calculate the percentage based on a…
Zefr
  • 11
  • 2
0
votes
1 answer

Putting dynamic CSS URLs in HTTP headers with Fastly CDN

I'm generating dynamic CSS URLs for cache-busting. I.e. they're in the format styles-thisisthecontenthash123.css. I also want to use HTTP Link headers to load the files slightly faster. I.e. have the header Link:…
Leo Jiang
  • 24,497
  • 49
  • 154
  • 284
0
votes
1 answer

How to fix unterminated short string error in Varnish VCL while configuring Fastly CDN

I am trying to setup token based authentication on Fastly CDN with Varnish VCL and using this sample VCL snippet to generate and validate JWT tokens here - sub vcl_recv { #FASTLY recv if (req.request != "HEAD" && req.request != "GET" &&…
Harshit Laddha
  • 2,044
  • 8
  • 34
  • 64
0
votes
1 answer

App Engine flexible behind a CDN (Fastly)

We are running an App Engine Flexible app behind with Fastly (CDN) on the front. We have set up ghs.googlehosted.com as the origin server, so the CDN forwards the request to that server if it doesn't have the cached version. This has been running…
Alex
  • 1,021
  • 3
  • 10
  • 16
0
votes
1 answer

fastly and/or general varnish subroutine request flow

So Fastly use a modified version of varnish 2.1.5 They don't provide diagrams of the subroutine request flow, but varnish do (see below). Now according to the below image vcl_hash is only ever entered when you execute a lookup within vcl_recv. But…
Integralist
  • 5,899
  • 5
  • 25
  • 42
0
votes
1 answer

Show content from /page/a on url /page/b Varnish

I would like to setup Varnish 2.1.5 rules to show content from another page in some cases, yet keep the original URL intact. eg When user requests /page/a s/he will be shown /page/b instead, but still see the /page/a URL in the browser. This…
Vinnie James
  • 5,763
  • 6
  • 43
  • 52
0
votes
0 answers

modifying response body and serve fragments

We have a web app served via CDN, I want to turn it into a SPA/PWA and need to serve the pages without the header footer (fragments only) To achieve this, it will need to strip out some dynamic sections.. or pre-define points…
adardesign
  • 33,973
  • 15
  • 62
  • 84
0
votes
1 answer

Fastly CDN push on demand

Requirements I want to propagate a file to all the fastly POPs as soon as the file is published by some worker or external upload monitoring service. Resonance If my content is propagated through several POPs then each and every new request will…
Yaron
  • 1,199
  • 1
  • 15
  • 35
0
votes
0 answers

Fastly CDN - do not cache specific sections of a page

I am reading Fastly's guides on how to cache pages or using conditions to not cache specific pages. The site I'm working on has some dynamic elements present on all pages of the site which I need to not be cached. The Fastly guides mention passing…
Full Time Skeleton
  • 1,680
  • 1
  • 22
  • 39
0
votes
1 answer

Adding Fastly CDN causes redirects to wrong host in Yii. AKA: Why is my Yii app with custom domain redirecting to app.herokuapp.com?

I added Fastly CDN to my site, and now when I try to log into the admin section, it will redirect to site.herokuapp.com/site/login instead of www.site.com/site/login. I suppose this is because Fastly is requesting the page on the backend with HOST:…
Chloe
  • 25,162
  • 40
  • 190
  • 357
0
votes
1 answer

Regex match groups lookback

I'm trying to extract the same data (but in different "chunks" from a string several times. The use-case is parsing of Syslog messages from Fastly in Fluentd. I have this log line: 2015-08-27T12:36:58Z cache-foo1234 Name[123456]: 4.151.22.16 "-" "-"…
0
votes
1 answer

Cached content expiring too frequently on fastly CDN

I'm using Fastly as a CDN in front of my Heroku application, and am seeing many requests that I expect to be cached make it through. An example of this behavior is two requests to the URL:…
wless1
  • 3,489
  • 1
  • 16
  • 12
0
votes
1 answer

Purge a URL from the Fastly CDN via API call with curl or wget

I use a bash script to deploy a static webpage which uses Fastly as a CDN. When /example.html gets deployed I would like to purge /example.html via their API within the bash script. I know that there is a good to go Ruby gem but I'd like to do it…
wintermeyer
  • 8,178
  • 8
  • 39
  • 85
0
votes
2 answers

How to properly serve static assets with Hapijs

I'm trying to get Fastly pointed at my heroku instance that is running hapijs and serving static files from /assets/. I have a route setup that looks like this: // Assets { method: "GET", path: "/assets/{path*}", config: { …
Micah
  • 111,873
  • 86
  • 233
  • 325
-1
votes
1 answer

Audio streaming from Google Cloud Storage and CDNs - costs

So I'm making an app that involves streaming audio(radio-like) from the Google Cloud Storage and was looking into the costs. It seems it would be much too expensive as is. e.g. Lets say I have 10MB audio files, a user listens to 20 files a day and I…