CloudEDGE Workers Overview
The Webscale CloudEDGE platform is a distributed cloud computing platform. It enables fast, personalized commerce and application content delivery to the edge. (The edge is the network location closest to where the user’s browser connects to Webscale). The platform includes CloudEDGE CDN and CloudEDGE Workers, which you can manage through the Webscale Control Panel.
Note:When Webscale CDN does not find the resource for a request, a cache “miss” occurs and it forwards the request to your application (also known as “origin”).
For an illustration on how to use CloudEDGE Workers, see CloudEDGE Workers Usage Example.
- CloudEDGE Workers feature
- Procedure for working with CloudEDGE Workers
- Worker execution
CloudEDGE Workers feature
A handler incorporates the handler file. When you configure a handler, you choose one function from the handler file to run. The caching policy with which the handler is associated determines when the function runs. Associating a handler with the CDN control for the policy creates a CloudEDGE worker. Currently, workers execute after cache misses.
Workers can do everything from optimizing cached images to injecting security cookies.
Procedure for working with CloudEDGE Workers
You can use the following procedure to work with handlers and workers. The Webscale Control Panel enables you to manage handlers and workers. For information on creating handlers and workers, see Working with CloudEDGE Handlers and Workers.
Upload handler files
Handler files adhere to the common structure used for NPM packages with some additional constraints. You can upload handler files to your account through the Files page. All applications for your account can then use the file for their handlers.
The Files page enables you to view all files in the NPM package and their contents. You can also use this page to download, replace, edit, and delete handler files.
For information about uploading files, see Working with Files.
For information about creating handler files, see Creating Handler Files.
When you create a handler, you configure the following settings.
- Description (optional)
- Handler file
When you select the provider, you can only choose a provider that has Webscale CDN and CloudEDGE Workers enabled for it.
You can only select one function for a handler. It can be either a request or response function that deploys as a request or response worker.
The memory setting specifies the maximum amount of computing resources that the provider will allocate to the worker during execution.
Note:You can create more than one handler with the same file. If the file has multiple functions, you can choose the one that you want for the handler.
Caching policies specify the workers that will run. Each CDN control for a caching policy has settings that enable you to associate handlers with the control, which results in a worker. By default, CDN controls do not have handlers associated with them. You can select a request handler, response handler, or both for a control. When creating the control, you define when the worker runs.
A worker with a request function executes before Webscale CDN forwards the request to origin. A worker with a response function runs in conjunction with the origin response.
When you have a CDN control with two handlers, the CDN control will have a worker for each type of function. For a cache miss, the request and response workers for the CDN control will both run.
CDN controls determine how Webscale CDN responds to incoming requests for assets. It compares the path for each request to the request paths for your CDN controls. If Webscale CDN finds a match, it searches for the resource in its cache.
When a cache “miss” occurs, Webscale CDN forwards the request to your application and the worker with a request handler runs. When your application sends a response, the response worker executes.
- CloudEDGE CDN Overview
- Configuring Webscale CDN Caching Policies
- Creating Handler Files
- Working with Files
- Working with CloudEDGE Handlers and Workers
- CloudEDGE Workers Usage Example
- HTTP Headers and Status Codes
Have questions not answered here? Please Contact Support to get more help.
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.