Define limits
Each worker can configure the limits for its execution context in Adobe I/O Runtime. These values should be tuned to provide optimal sizing for the worker, based on the volume, rate and type of assets it will compute, as well as the type of work it performs.
Review Adobe sizing guidance before setting limits. Asset Compute workers can run out of memory when processing assets, resulting in the Adobe I/O Runtime execution being killed, so ensure the worker is sized appropriately to handle all candidate assets.
- Add an
inputs
section to the newwknd-asset-compute
actions entry. This allows tuning of the Asset Compute worker’s overall performance and resource allocation.
packages:
__APP_PACKAGE__:
license: Apache-2.0
actions:
worker:
function: actions/worker/index.js
web: 'yes'
runtime: 'nodejs:12'
limits: # Allows for the tuning of the worker's performance
timeout: 60000 # timeout in milliseconds (1 minute)
memorySize: 512 # memory allocated in MB; if the worker offloads heavy computational work to other Web services this number can be reduced
concurrency: 10 # adjust based on expected concurrent processing and timeout
annotations:
require-adobe-auth: true
The finished manifest.yml
The final manifest.yml
looks like:
packages:
__APP_PACKAGE__:
license: Apache-2.0
actions:
worker:
function: actions/worker/index.js
web: 'yes'
runtime: 'nodejs:12'
limits:
timeout: 60000 # in ms
memorySize: 512 # in MB
concurrency: 10
annotations:
require-adobe-auth: true