Flexible composition (Beta)

Flexible composition lets development teams within an organization work separately to create and deploy multiple EdgeWorkers for the same website.


Sign up for the Flexible Composition Beta program

Flexible composition is now available for you to use as part of a Beta program. At the moment you need to contact your Akamai representative to opt-in to this new feature.

With flexible composition two or more EdgeWorkers can handle a single request. The logic for handling the request can be developed, tested, debugged, activated, and monitored by several teams. This is ideal for larger organizations that want to:

  • Reuse code across multiple EdgeWorkers - Create a library EdgeWorker that other teams can use to perform common functionality, such as verifying an authorization header.
  • Delegate to other EdgeWorkers - Configure the parent EdgeWorker to choose another child to run based on the path of the request.
  • Wrap API Endpoints - Encapsulate implementation decisions inside an EdgeWorkers function and use it to modify the implementation of the API endpoint.

This package management solution runs on the Akamai staging and production networks. It enables one EdgeWorker to depend on another EdgeWorker via a dependency list. Dependencies are automatically pulled in to create a combined code bundle. When a child is updated the parent is automatically updated too.

The diagram below shows the parent EdgeWorker receiving a request. It then calls into the child EdgeWorkers, Marketing and Security. In this example two different teams created and activated the child EdgeWorkers using their preferred tools. The parent EdgeWorker can only import an activated child EdgeWorker. If a new version of a child EdgeWorker is activated, the parent EdgeWorker will be dynamically reactivated. This lets teams work independently to add new capabilities to a website.

To learn more go to, Create a parent EdgeWorker and Add a child EdgeWorker to an existing parent.


You can use the EdgeWorkers Management application or the EdgeWorkers APIs to perform tasks related to flexible composition.

Benefits of flexible composition

Flexible composition accommodates organizations that have several development teams. Review these benefits to learn more about how you can use this capability to improve your EdgeWorkers development process.

  • Independent contribution - Each team can work at its own pace. You can activate a new version of your EdgeWorkers function anytime you need to add content to the website. You don't need to coordinate with other teams.

  • Dynamic activation - The parent EdgeWorker automatically receives updates. The owner doesn't need to rebuild, upload, or run a CI pipeline to activate it.

  • Import EdgeWorkers as separate files - Each child EdgeWorker is represented as a JavaScript module.

  • Friction-free code reuse - Child EdgeWorkers can export any type of JavaScript object, including classes and functions.

  • Choose your developer tools - Each team in your organization can use the developer tools they prefer. If you want to build your EdgeWorkers in TypeScript, you can do so without having to integrate into a larger build chain.


By default, the security access model grants any parent EdgeWorkers access to child EdgeWorkers created under the same account. This is provided that the team that created the combined code bundle has Publisher - writeActivationEdgeWorker permission on the parent EdgeWorker and Viewer - readVersionEdgeWorker permission on transitive dependencies.


For more information refer the to Manage access to EdgeWorkers section in this guide.

Product limits

These limits apply to EdgeWorkers functions created using flexible composition.


The existing Product and Resource tier limits also apply to the parent EdgeWorker and to all of the parent's child EdgeWorkers. The limits do not apply individually to each EdgeWorker in a combined code bundle.

Maximum dependency tree height from the top-level parent of an active revisionThe supported depth of the dependency tree. The number of levels of child EdgeWorkers that a top-level parent can import.
For example, parent EdgeWorker version 1, imports:
-> EdgeWorker 2 version 1 imports
-- > EdgeWorker 3 version 1 imports
---> EdgeWorker 4 version 2 imports
----> EdgeWorker 5 version 3 imports
-----> EdgeWorker 6 version 1 → maximum height reached
Maximum direct dependencies that can be imported by a parent revisionThe number of child EdgeWorkers that a top-level parent can directly import.
For example, parent EdgeWorker version 1, revision 3 imports as direct children:
- EdgeWorker 1
- EdgeWorker 2
- EdgeWorker 3
- EdgeWorker 4
- EdgeWorker 5 → maximum imports reached
Number of times an active version can be imported by an active revisionThe number of parent EdgeWorkers an active child EdgeWorker version can belong to.
For example, EdgeWorker 1, version 1 is imported by:
- EdgeWorker 2 version 1, revision 1
- EdgeWorker 3 version 1, revision 1
- EdgeWorker 4 version 1, revision 2
- EdgeWorker 5 version 2, revision 1
- EdgeWorker 6 version 3, revision 5 → maximum number of parents reached
Maximum dependencies per revisionThe number of dependencies a parent EdgeWorkers function supports, including children and descendants of children.30
Compressed size for a combined code bundle1 MB
Uncompressed size for a combined code bundle5 MB


Refer to the Terminology section in this guide to learn more about the concepts and terms used for flexible composition.