Skip to content

Commit 9c9aacb

Browse files
committed
Add a documentation for warmed containers configurations.
1 parent 8d31e96 commit 9c9aacb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

docs/warmed-containers.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
# Warmed Containers
20+
21+
Warmed containers can improve their performance by skipping the container initialization step.
22+
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.
23+
24+
## Configuration
25+
26+
The configurations are only effective with the FPC scheduler.
27+
They can be configured using the limit configurations for each namespace.
28+
29+
```scala
30+
case class UserLimits(invocationsPerMinute: Option[Int] = None,
31+
concurrentInvocations: Option[Int] = None,
32+
firesPerMinute: Option[Int] = None,
33+
allowedKinds: Option[Set[String]] = None,
34+
storeActivations: Option[Boolean] = None,
35+
warmedContainerKeepingCount: Option[Int] = None,
36+
warmedContainerKeepingTimeout: Option[String] = None)
37+
```
38+
39+
So those can be configured in the same way that operators configure the `invocationPerMinute` limit.
40+
41+
```json
42+
{
43+
"_id": "guest/limits",
44+
"invocationPerMinutes": 10,
45+
"warmedContainerKeepingCount": 8,
46+
"warmedContainerKeepingTimeout": "24 hours"
47+
}
48+
```
49+
50+
The namespace-specific configurations would override the default, system-wide configurations.
51+
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)