-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an optional CDN resource for web applications with static assets #459
Comments
cc @daphnegold @SammySteiner @acouch in case y'all go this route on your project |
@sawyerh thanks sawyer. added my thoughts on technical design |
I implemented most of this today on a project. I did it quickly so probably room for improvement, but hopefully a useful starting point |
awesome! might need to pick your brain later to see how it works and what we can use. some initial questions:
|
@lorenyu Good questions.
I initially had the S3 bucket because I couldn't figure out how to get Django to serve the static assets but finally figured that out. In the latest changes on the repo I linked, the S3 bucket is no longer part of the infra. I think having the CDN pull from the server directly seems fine but I haven't researched it too deeply. Seems fine if it is a relatively long cache.
I think using the default Cloudfront domain would suffice for the template and most teams could get away with just using the default. A custom domain would be useful is if it's a static site and you are also putting the static site behind Cloudfront. |
Web applications include static assets (images, fonts, css, client-side JS bundles) and can also include static HTML pages. A CDN, like Cloudfront, provides a caching layer that can improve the performance and scaleability of these web applications. It could be helpful if the Infra template provided a quick way to setup a CDN on a project.
Technical design
Proposed design
has_cdn
to app-configinfra/modules/cdn
infra/app/service
module ifapp_config.has_cdn
is trueCan reference a variation of this approach here.
Alternatives considered
infra/modules/service
— this adds complexity to the service module and is not relevant for some services, such as API services.Testing
Release management
The text was updated successfully, but these errors were encountered: