Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

use same semantic as fastly to deliver static files #51

Closed
tripodsan opened this issue Sep 6, 2018 · 2 comments
Closed

use same semantic as fastly to deliver static files #51

tripodsan opened this issue Sep 6, 2018 · 2 comments
Assignees

Comments

@tripodsan
Copy link
Contributor

best would be to consider the manifest.json if to deliver a static file or not.
otherwise, for now just check if file exists below ./dist/

@tripodsan tripodsan self-assigned this Sep 6, 2018
@trieloff
Copy link
Contributor

trieloff commented Sep 6, 2018

Quick recap on how our VCL does it:

  • fetch the requested path from the action
  • if status==404, retry using static delivery

@tripodsan
Copy link
Contributor Author

tripodsan commented Sep 6, 2018

I also see:

a) manifest in edge

  • list of static files is in edge directly.
  • fastly chooses source accordingly

b) manifest in (default) action

  • fetch the requested path from the action
  • action contains manifest and can very quickly decide if resource is static or not
  • if status==404, retry using static delivery

c) action can provide good redirect to resource (big files)

  • fetch the requested path from the action
  • action contains manifest and can very quickly decide if resource is static or not
  • action replies with redirect to static source if required
  • fastly fetches resource and merges with cache control headers

d) use /dist/* as prefix

  • rewrite all HTML in such a way that references to static files have a /dist prefix
  • fastly chooses source accordingly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants