upgle commented on code in PR #5229: URL: https://github.com/apache/openwhisk/pull/5229#discussion_r868876334
########## proposals/POEM-3-action-limit-for-namespace.md: ########## @@ -0,0 +1,132 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +# Title +Providing action limits for each namespace + +## Status +* Current state: In-progress +* Author(s): @upgle + +## Summary and Motivation + +This POEM proposes a new feature that allows administrators to set action limits (memory, timeout, log, and concurrency) for each namespace. + +Sometimes some users want to make an action with more memory and longer duration. But, Openwhisk only has a system limit for action, which is shared by all namespaces. +There is no way to loosen the action limit for just a few users, and changing the action limit setting will affect all users. + +## Proposed changes + +### 3 types of action limits + +There are 3 types of action limits: + +- (1) system limits: This limits can never be exceeded. +- (2) namespace default limits: This limit can be used if a limit has not been set for the namespace. +- (3) namespace limits: This limit can be set by the system administrator for namespace and cannot exceed the range of the system limit. + + +#### namespace default limit +Namespaces without additional namespace limits can create actions with memory ranging from 512MB to 1024MB. + +<img src="https://user-images.githubusercontent.com/5635513/166409786-bb6759f8-e860-4f1e-8524-a91cc8ddd2f9.png" width="600"> + +#### namespace limit (for `foo` namespace) +The `foo` namespace with a maximum memory limit of 2048MB can create actions that have between 512MB and 2048MB of memory. + +<img src="https://user-images.githubusercontent.com/5635513/166409938-66a257e5-e9a5-4031-9f3a-a0001a9c5c93.png" width="600"> + +### Limit document for CouchDB + +You can set namespace limits with `{namespace}/limits` document just like any other existing setting. +The config keys related to the action limit start with the string `action` and end with `Min`, and `Max`. + +```json +{ + "concurrentInvocations": 100, + "invocationsPerMinute": 100, + "firesPerMinute": 100, + "actionMemoryMax": 1024, + "actionMemoryMin": 128, + "actionConcurrencyMax": 400, + "actionConcurrencyMin": 1, + "actionLogsMax": 128, + "actionLogsMin": 0 +} +``` + +#### namespace limit configs Review Comment: > The only other thing I really want to check on then is that this is a backwards compatible change for existing systems who don't have a need to add this? Since the namespace default limit settings are included in application.conf, they are not completely backwards compatible. When deploying, you need to add a new configuration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
