Jason Byrne thoughts on using cloud Edge for some common tasks. As we spread our applications out into serverless microservices, what better place for our entitlement checks than on the CDN?
Whether most of the industry realizes it or not, serverless is the future. It is extremely freeing to embrace no longer worrying about managing infrastructure or trying to stay ahead of the traffic curve.
However, one thing you can not forget about is securing your content. Today we primarily use one of two methods: signed URLs or tokens. Both of these methods work okay, but they create more work than necessary.
There are a growing number of CDN providers that offer the ability to execute code on their Edges.
You will find capability to execute code on the Edge with:
- AWS Lambda@Edge
- Cloudflare Workers
- Fastly (via custom VCL)
- StackPath EdgeEngine
This article then focuses on describing StackPath EdgeEngine which is their code-at-edge service.
- They offer out 40Tb/s of network capacity and 45 full-scale PoPs on five continents
- Easy CDN setup
- Ability to create Edge script with a few clicks
- Deployment of changes to Edge servers worldwide within a couple of seconds
- Link to repository with template to get up and running with StackPath EdgeEngine and TypeScript
And much more. It also has example code for parsing the cookies from the request and then examine them to determine if the user is authenticated. Great introduction to serverless on the Edge!
[Read More]