-
Notifications
You must be signed in to change notification settings - Fork 840
Add a per client connection max exempt list cript #12476
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
base: master
Are you sure you want to change the base?
Add a per client connection max exempt list cript #12476
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for pre-compiled cript plugins and introduces a connection exempt list cript that manages per-client connection limit exemptions. The PR extends the build system to support cripts as first-class plugins and creates infrastructure for managing client connection exemptions through both configuration files and YAML-based plugins.
Key changes include:
- Build system updates to support pre-compiled cripts via the
add_criptCMake function - New connection exempt list functionality with API functions and configuration options
- Comprehensive test coverage for exempt list scenarios with both inline and file-based configurations
Reviewed Changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
cmake/add_cript.cmake |
Adds CMake function to build pre-compiled cript plugins |
plugins/experimental/connection_exempt_list/connection_exempt_list.cript |
New cript plugin for loading exempt lists from YAML files |
src/iocore/net/ConnectionTracker.cc |
Core logic for client connection exempt list management |
include/ts/ts.h |
Public API functions for managing connection exempt lists |
tests/gold_tests/client_connection/per_client_connection_max.test.py |
Expanded test coverage for exempt list functionality |
src/records/RecordsConfig.cc |
New configuration record for exempt list setting |
tools/clang-format.sh |
Formatting support for .cript files |
| Documentation files | API and admin documentation for new features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tests/gold_tests/client_connection/per_client_connection_max.test.py
Outdated
Show resolved
Hide resolved
plugins/experimental/connection_exempt_list/connection_exempt_list.cript
Show resolved
Hide resolved
tests/gold_tests/client_connection/per_client_connection_max.test.py
Outdated
Show resolved
Hide resolved
ea40a23 to
e5413cf
Compare
e5413cf to
ba8384f
Compare
ba8384f to
faef4cd
Compare
This implements proxy.config.http.per_client.connection.exempt_list, a configuration for the user to be able to provide a set of IP addresses that are not counted against proxy.config.net.per_client.max_connections_in. This also adds the following TS APIs to modify this list via a plugin: TSConnectionLimitExemptListSet TSConnectionLimitExemptListAdd TSConnectionLimitExemptListClear
This updates our build system to be able to make pre-compiled cripts. Thus, adding a cript is now as easy as adding a plugin. Simply use add_cript instead of add_atsplugin in CMakeLists.txt, and it will build your cript for you. As a part of this, this adds connection_exempt_list.cript, our first cript plugin that sets the per client exempt list.
faef4cd to
64128be
Compare
|
[approve ci autest 1] |
Note that this builds on top of #12198, so feel free to ignore that commit when reviewing this. I kept the units of work separate to make this specific cripts work easier to review.
This updates our build system to be able to make pre-compiled cripts.
Thus, adding a cript is now as easy as adding a plugin. Simply use
add_cript instead of add_atsplugin in CMakeLists.txt, and it will build
your cript for you.
As a part of this, this adds connection_exempt_list.cript, our first
cript plugin that sets the per client exempt list.