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

Feat: Add endpoint to configure and get flow control #19409

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

rodrigo-lourenco-lopes
Copy link
Contributor

@rodrigo-lourenco-lopes rodrigo-lourenco-lopes commented Jun 16, 2024

Description

This pull request adds an endpoint to set and get the flow control configuration.

The get method returns the several flow control limits configured for each partition and broker.

The set method will use the configuration that we send in the payload in JSON to set the limits of all partitions in all brokers. To note that since the append limit cannot be null, if this is not present in the JSON payload or is set as null, then it will not be changed. In case the JSON is not parseable to the object FlowControl configuration, the error message will be return along with an example of a configuration.

Related issues

closes #18731

@github-actions github-actions bot added component/zeebe Related to the Zeebe component/team component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team labels Jun 16, 2024
For this test the set and get method are using different decoders,
for which I think the easiest solution is to use two different
Feign actuators with an abstraction in between, I was not able
to find something more simple or elegant.
@rodrigo-lourenco-lopes rodrigo-lourenco-lopes force-pushed the rl-add-endpoint-to-configure-flow-control branch from 434bda8 to f3f1c97 Compare June 17, 2024 08:59
@rodrigo-lourenco-lopes rodrigo-lourenco-lopes marked this pull request as ready for review June 17, 2024 08:59
Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

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

Nice work @rodrigo-lourenco-lopes 🥇
I have a couple of suggestions and things I'd like to see changed but nothing major 🎉

Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

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

Updating my review to reflect the current state:

❌ The actuator endpoints should respond with content type application/json.

Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

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

❌ the actuator is still responding in plain text:

curl -v localhost:9600/actuator/flowControl
* Host localhost:9600 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:9600...
* Connected to localhost (::1) port 9600
> GET /actuator/flowControl HTTP/1.1
> Host: localhost:9600
> User-Agent: curl/8.6.0
> Accept: */*
> 
< HTTP/1.1 200 
< Content-Type: text/plain;charset=UTF-8
< Content-Length: 177
< Date: Tue, 02 Jul 2024 13:48:38 GMT
< 
* Connection #0 to host localhost left intact
{"partitions":[{"flowControlConfig":"{REQUEST=com.netflix.concurrency.limits.limit.WindowedLimit@113ef35e, APPEND=VegasLimit [limit=1024, rtt_noload=0.0 ms]}","partitionId":1}]}

❌ The windowed limit is not serialized properly.

I think the serialization approach is not great overall, I'll take a look to try and find a way to make this look nice and maintainable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team component/zeebe Related to the Zeebe component/team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add endpoint to configure flow control
2 participants