Skip to content

Commit 1fbfd6b

Browse files
authored
Add a documentation for warmed containers configurations. (#5282)
1 parent 4a69be2 commit 1fbfd6b

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/warmed-containers.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!--
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
-->
19+
20+
# Warmed Containers
21+
22+
Warmed containers can improve their performance by skipping the container initialization step.
23+
It may be beneficial to configure the number of warmed containers to keep, and the duration to keep them according to the characteristics of workloads.
24+
25+
## Configuration
26+
27+
The configurations are only effective with the FPC scheduler.
28+
They can be configured using the limit configurations for each namespace.
29+
30+
```scala
31+
case class UserLimits(invocationsPerMinute: Option[Int] = None,
32+
concurrentInvocations: Option[Int] = None,
33+
firesPerMinute: Option[Int] = None,
34+
allowedKinds: Option[Set[String]] = None,
35+
storeActivations: Option[Boolean] = None,
36+
warmedContainerKeepingCount: Option[Int] = None,
37+
warmedContainerKeepingTimeout: Option[String] = None)
38+
```
39+
40+
So those can be configured in the same way that operators configure the `invocationPerMinute` limit.
41+
42+
```json
43+
{
44+
"_id": "guest/limits",
45+
"invocationPerMinutes": 10,
46+
"warmedContainerKeepingCount": 8,
47+
"warmedContainerKeepingTimeout": "24 hours"
48+
}
49+
```
50+
51+
The namespace-specific configurations would override the default, system-wide configurations.
52+
In the above example, the system will keep 8 warmed containers for 24 hours even if there is no activation at all.

0 commit comments

Comments
 (0)