-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description: - Static assets (such as CSS, images and Javascript) are stored in an S3 bucket. Currently to retrieve a static asset Fastly will make a request to an nginx pod running in router. nginx will then retrieve the static asset from S3 before passing it to Fastly. - This commit makes Fastly talk directly to S3 without going through nginx and Router by adding a new backend for Fastly to talk to - Currently if the asset requested doesn’t exist in the S3 bucket then S3 will return a 403 which nginx maps to a static 403 error page stored under the /error_pages prefix in S3. Status codes between 500-599 are handled in the if block above which triggers a restart causing Fastly to poll the S3 mirror instead. Any other non-200 status code is handled by the new if block which also sets up a restart so that any subsequent requests (e.g. req.restarts > 0) will go to the mirror - See the diagram in #73 for the previous method and the proposed new implementation
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters