Skip to content

Commit 6e115b3

Browse files
add maxConcurrency parameter for containers (#106)
1 parent a728ad3 commit 6e115b3

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ serverless invoke --function first
3232

3333
Serverless Framework handles everything from creating namespaces to function/code deployment by calling APIs endpoint under the hood.
3434

35-
- [Serverless Framework: Deploy on Scaleway Functions](#serverless-framework-deploy-on-scaleway-functions)
35+
- [Scaleway Plugin for Serverless Framework](#scaleway-plugin-for-serverless-framework)
36+
- [Quick-start](#quick-start)
37+
- [Contents](#contents)
3638
- [Requirements](#requirements)
3739
- [Create a Project](#create-a-project)
3840
- [Configure your functions](#configure-your-functions)
@@ -142,6 +144,7 @@ The different parameters are:
142144
* `secret` (Optional): secret environment variables specific for the current function, see [this example project](./examples/secrets)
143145
* `minScale` (Optional): how many function instances we keep running (default: 0)
144146
* `maxScale` (Optional): maximum number of instances this function can scale to (default: 20)
147+
* `maxConcurrency` (Containers only, Optional): Concurrency defines the number of simultaneous requests your container can handle at the same time (default: 50)
145148
* `memoryLimit`: ram allocated to the function instances. See the introduction for the list of supported values
146149
* `timeout`: is the maximum duration in seconds that the request will wait to be served before it times out (default: 300 seconds)
147150
* `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).

deploy/lib/createContainers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module.exports = {
6262
memory_limit: container.memoryLimit,
6363
min_scale: container.minScale,
6464
max_scale: container.maxScale,
65+
max_concurrency: container.maxConcurrency,
6566
timeout: container.timeout,
6667
privacy: container.privacy,
6768
port: container.port,
@@ -85,6 +86,7 @@ module.exports = {
8586
memory_limit: container.memoryLimit,
8687
min_scale: container.minScale,
8788
max_scale: container.maxScale,
89+
max_concurrency: container.maxConcurrency,
8890
timeout: container.timeout,
8991
privacy: container.privacy,
9092
port: container.port,

examples/container-schedule/serverless.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ custom:
2828
# minScale: 1
2929
# memoryLimit: 256
3030
# maxScale: 2
31+
# maxConcurrency: 50,
3132
# timeout: 20000
3233
# Local environment variables - used only in given function
3334
env:

examples/container/serverless.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ custom:
2222
# minScale: 1
2323
# memoryLimit: 256
2424
# maxScale: 2
25+
# maxConcurrency: 50,
2526
# timeout: 20000
2627
# port: 8080
2728
# Local environment variables - used only in given function

0 commit comments

Comments
 (0)