EdgeWorkers is a server-less solution that uses scripts that are invoked at the different phases of an HTTP request. This provides an opportunity to improve performance, by moving the compute operations closer to your users.
Once you add EdgeWorkers to your property, developers can activate code outside of Akamai Control Center. Just activate custom scripts and efficiently implement enhancements. You can write functions that access HTTP headers, cookies, and URLs in order to construct complex logic.
So, if you want to implement Download Delivery enhancements, but don't have significant experience with Control Center or Property Manager, you can use EdgeWorkers.
Here are some more examples of how you can use EdgeWorkers:
- Redirect requests based on geography, device, and user-agent
- Apply conditional logic to filter traffic and construct responses
- Add or remove debug information from an HTTP message
- Respond with custom error responses, even when the origin is down
There are some administrative tasks required to configure your Download Delivery property to execute EdgeWorkers functions:
We've put together some tutorials that show you how to get an EdgeWorkers function up and running on your site. You'll learn how to set up the EdgeWorkers service and then create and deploy the Hello World code bundle using the EdgeWorkers Management application, API, and CLI.
Before you add EdgeWorkers support to your Download Delivery configuration, there are some known issues you should consider. We are working on fixes to these issues.
EdgeWorkers is not supported for use with Auth Token 2.0 Verification. An EdgeWorkers request for your Download Delivery property that also has Auth Token 2.0 Verification enabled is denied.
EdgeWorkers is not supported for use with Partial Object Caching (POC). You can't include various behaviors or options in your Download Delivery property rules if you want to use EdgeWorkers. This includes the following:
Media File Retrieval Optimization. This is a caching-related behavior that helps speed the delivery of larger media files when NetStorage is your origin.
Origin Object Size settings in Content Characteristics. POC is automatically applied for the larger origin objects you can select as your Origin Object Size in the Content Characteristics behavior. You can't select any of these Origin Object Sizes if you also want to use EdgeWorkers with your Download Delivery configuration. See Content Characteristics & Download Delivery for specifics.
EdgeWorkers is not supported for use with the Cache HTTP Redirects behavior. After the Cache HTTP Redirects behavior applies a redirect, follow-up EdgeWorkers requests fail due to an error with origin-side event handlers.
The EdgeWorkers "failaction" is incompatible with the Site Failover behavior if it's Action is set to "Serve alternate content from NetStorage." You'll see a 400 response when an EdgeWorkers execution fails and the Site Failover behavior tries to fetch content from NetStorage as your alternate origin. If you need to incorporate Site Failover, you'll need to set the failover Action to something other than NetStorage.
Updated 11 months ago