Skip to content

Commit

Permalink
config: reduce the default for max_kafka_throttle_delay_ms
Browse files Browse the repository at this point in the history
`max_kafka_throttle_delay_ms` default value changed to 30s to align
with the default setting of `session.timeout.ms` in java client and in
librdkafka which is 45s there. By setting the default max throttle delay
lower than session timeout, it is possible to avoid heartbeat timeouts
for librdkafka clients (librdkafka does not support KIP-219 as of now
and therefore relies on broker doing throttling) with default
configuration on both client and broker.
  • Loading branch information
dlex committed Apr 10, 2023
1 parent f672c22 commit e2a36f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/v/config/configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ configuration::configuration()
"max_kafka_throttle_delay_ms",
"Fail-safe maximum throttle delay on kafka requests",
{.needs_restart = needs_restart::no, .visibility = visibility::tunable},
60'000ms)
30'000ms)
, kafka_max_bytes_per_fetch(
*this,
"kafka_max_bytes_per_fetch",
Expand Down
4 changes: 2 additions & 2 deletions src/v/kafka/server/tests/produce_consume_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ FIXTURE_TEST(test_node_throughput_limits_static, throughput_limits_fixure) {
"kafka_throughput_limit_node_out_bps",
std::make_optional(pershard_rate_limit_out * ss::smp::count));
config_set("fetch_max_bytes", batch_size);
config_set("max_kafka_throttle_delay_ms", 60'000ms);
config_set("max_kafka_throttle_delay_ms", 30'000ms);
config_set_window_width(200ms);
config_set_balancer_period(0ms);
config_set_rate_minimum(0);
Expand Down Expand Up @@ -414,7 +414,7 @@ FIXTURE_TEST(test_node_throughput_limits_balanced, throughput_limits_fixure) {
"kafka_throughput_limit_node_out_bps",
std::make_optional(rate_limit_out));
config_set("fetch_max_bytes", batch_size);
config_set("max_kafka_throttle_delay_ms", 60'000ms);
config_set("max_kafka_throttle_delay_ms", 30'000ms);
config_set("kafka_quota_balancer_min_shard_throughput_ratio", 0.);
config_set_window_width(100ms);
config_set_balancer_period(50ms);
Expand Down

0 comments on commit e2a36f7

Please sign in to comment.