Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved documentation for api_concurrency_limit #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alopalao
Copy link

Closes #504

Summary

Added more documentation to api_concurrency_limit in the template for the configuration file

Local Tests

N/A

End-to-End Tests

N/A

@Alopalao Alopalao requested a review from a team as a code owner February 26, 2025 18:46
# HTTP requests (GET, POST, PATCH) used by the users and some NApps like
# of_lldp, mef_eline. These requests can happen multiple times in a very
# short period of time. "threadpool" is the default value to take the same
# values as thread_pool_max_workers["api"]. It can be replaced by an integer.
Copy link
Author

@Alopalao Alopalao Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api_concurrency_limit and thread_pool_max_workers["api"] are very related. Thinking in probably mentioning that the difference is that api_concurrency_limit is for the initial connections/HTTP messages for (GET, POST, PATCH) and thread_pool_max_workers["api"] is for the processing of these messages (e.g content) that relates more with database and changes in memory. Is this correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alopalao what we need to explain here is that in summary:

We provide two ways to configure the concurrency of the API server and the number of thread pool workers, https://github.com/kytos-ng/kytos/blob/master/kytos/core/api_server.py#L67-L82. In typical cases what users want is to indeed use api_concurrency_limit = "threadpool" same size as the threadpool but we also support cases where the thread pool can be larger but api_concurrency_limit can be lower limiting the capacity of the requests the server can handle.

And the size of the API threadpool also depends on how much the endpoints are being used (which as know are also correlated with how many resources are being created and scalability), here is a comment worth also linking in the docs #489 (comment) of the template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

config docs: document on kytos.conf what "threadpool" value on api_concurrency_limit means
2 participants