We suggested a migration towards serverless technologies which resulted in:
- Migration from MongoDB to DynamoDB
- Getting rid of RDS
- Utilization of DynamoDB DAX for Read Operations Cache
- Utilization of CloudFront and S3 for efficient CDN and content signing
- Utilization of Cognito for Authentication
- Utilization of CloudFormation for IaC
During the CDN implementation Alpacked noticed multiple OCP frontend requirements to the forwarded headers.
This way, it was needed to forward Accept, Accept-Encoding, Referer, Host and query string parameters which increased the amount of requests needed by CloudFront to cache various content and also increased the hosting bill.
Alpacked ended up with a much more explicit behavior configuration which included different rules for js files, css, html, images and fonts, etc. Advanced behavior content configuration allowed to minimize the impact of whitelisted cache headers: