diff --git a/README.md b/README.md index ab43d5b5..68940023 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,9 @@ serverless invoke --function first Serverless Framework handles everything from creating namespaces to function/code deployment by calling APIs endpoint under the hood. -- [Serverless Framework: Deploy on Scaleway Functions](#serverless-framework-deploy-on-scaleway-functions) +- [Scaleway Plugin for Serverless Framework](#scaleway-plugin-for-serverless-framework) + - [Quick-start](#quick-start) + - [Contents](#contents) - [Requirements](#requirements) - [Create a Project](#create-a-project) - [Configure your functions](#configure-your-functions) @@ -142,6 +144,7 @@ The different parameters are: * `secret` (Optional): secret environment variables specific for the current function, see [this example project](./examples/secrets) * `minScale` (Optional): how many function instances we keep running (default: 0) * `maxScale` (Optional): maximum number of instances this function can scale to (default: 20) + * `maxConcurrency` (Containers only, Optional): Concurrency defines the number of simultaneous requests your container can handle at the same time (default: 50) * `memoryLimit`: ram allocated to the function instances. See the introduction for the list of supported values * `timeout`: is the maximum duration in seconds that the request will wait to be served before it times out (default: 300 seconds) * `runtime`: (Optional) runtime of the function, if you need to deploy multiple functions with different runtimes in your Serverless Project. If absent, `provider.runtime` will be used to deploy the function, see [this example project](./examples/multiple). diff --git a/deploy/lib/createContainers.js b/deploy/lib/createContainers.js index 4acad60b..a41e35f2 100644 --- a/deploy/lib/createContainers.js +++ b/deploy/lib/createContainers.js @@ -62,6 +62,7 @@ module.exports = { memory_limit: container.memoryLimit, min_scale: container.minScale, max_scale: container.maxScale, + max_concurrency: container.maxConcurrency, timeout: container.timeout, privacy: container.privacy, port: container.port, @@ -85,6 +86,7 @@ module.exports = { memory_limit: container.memoryLimit, min_scale: container.minScale, max_scale: container.maxScale, + max_concurrency: container.maxConcurrency, timeout: container.timeout, privacy: container.privacy, port: container.port, diff --git a/examples/container-schedule/serverless.yml b/examples/container-schedule/serverless.yml index 621ce05b..bce72782 100644 --- a/examples/container-schedule/serverless.yml +++ b/examples/container-schedule/serverless.yml @@ -28,6 +28,7 @@ custom: # minScale: 1 # memoryLimit: 256 # maxScale: 2 + # maxConcurrency: 50, # timeout: 20000 # Local environment variables - used only in given function env: diff --git a/examples/container/serverless.yml b/examples/container/serverless.yml index b9d52242..ae70b0d5 100644 --- a/examples/container/serverless.yml +++ b/examples/container/serverless.yml @@ -22,6 +22,7 @@ custom: # minScale: 1 # memoryLimit: 256 # maxScale: 2 + # maxConcurrency: 50, # timeout: 20000 # port: 8080 # Local environment variables - used only in given function