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

Kafka advanced config defaults: set default/max values for advanced config settings #934

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

Conversation

dweinshenker
Copy link
Contributor

@dweinshenker dweinshenker commented Oct 22, 2024

What

  • Sets defaults for advanced config settings related to Kafka
  • Sets maximum values for various params, based on the size of int64

@dweinshenker dweinshenker changed the title Kafka advanced config defaults: set default values for advanced config settings Kafka advanced config defaults: set default/max values for advanced config settings Oct 23, 2024
@loosla
Copy link
Contributor

loosla commented Oct 23, 2024

👋 Hello, thanks for setting defaults for Kafka 🙏

  • Just curious if these defaults were released and accessible through API or they are planned to be released soon?

When I create a Kafka topic without advanced config parameters with
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" -d '{"name":"customer-events", "partition_count":3, "replication_factor": 3, "config": {}}' "https://api.digitalocean.com/v2/databases/90b1549f-f9a4-4927-9ece-30303ebab89a/topics"

I'm getting

"config": {
      "cleanup_policy": "delete",
      "compression_type": "producer",
      "delete_retention_ms": 86400000,
      "file_delete_delay_ms": 60000,
      "flush_messages": 9223372036854776000,
      "flush_ms": 9223372036854776000,
      "index_interval_bytes": 4096,
      "max_compaction_lag_ms": 9223372036854776000,
      "max_message_bytes": 1048588,
      "message_down_conversion_enable": true,
      "message_format_version": "3.0-IV1",
      "message_timestamp_difference_max_ms": 9223372036854776000,
      "message_timestamp_type": "create_time",
      "min_cleanable_dirty_ratio": 0.5,
      "min_compaction_lag_ms": 0,
      "min_insync_replicas": 1,
      "preallocate": false,
      "retention_bytes": -1,
      "retention_ms": 604800000,
      "segment_bytes": 1073741824,
      "segment_index_bytes": 10485760,
      "segment_jitter_ms": 0,
      "segment_ms": 604800000
    }
  • Can it cause potential problems for out customers for example when we change default for compression_type from "producer" to "uncompressed"?

Many thanks 🙏

@dweinshenker
Copy link
Contributor Author

👋 Hello, thanks for setting defaults for Kafka 🙏

  • Just curious if these defaults were released and accessible through API or they are planned to be released soon?

When I create a Kafka topic without advanced config parameters with curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" -d '{"name":"customer-events", "partition_count":3, "replication_factor": 3, "config": {}}' "https://api.digitalocean.com/v2/databases/90b1549f-f9a4-4927-9ece-30303ebab89a/topics"

I'm getting

"config": {
      "cleanup_policy": "delete",
      "compression_type": "producer",
      "delete_retention_ms": 86400000,
      "file_delete_delay_ms": 60000,
      "flush_messages": 9223372036854776000,
      "flush_ms": 9223372036854776000,
      "index_interval_bytes": 4096,
      "max_compaction_lag_ms": 9223372036854776000,
      "max_message_bytes": 1048588,
      "message_down_conversion_enable": true,
      "message_format_version": "3.0-IV1",
      "message_timestamp_difference_max_ms": 9223372036854776000,
      "message_timestamp_type": "create_time",
      "min_cleanable_dirty_ratio": 0.5,
      "min_compaction_lag_ms": 0,
      "min_insync_replicas": 1,
      "preallocate": false,
      "retention_bytes": -1,
      "retention_ms": 604800000,
      "segment_bytes": 1073741824,
      "segment_index_bytes": 10485760,
      "segment_jitter_ms": 0,
      "segment_ms": 604800000
    }
  • Can it cause potential problems for out customers for example when we change default for compression_type from "producer" to "uncompressed"?

Many thanks 🙏

Hi @loosla - you're correct on the default for compression_type, it's a mistake in the PR. I have correct that. I was originally looking at producer compression config that we do not currently support.

@dweinshenker dweinshenker force-pushed the dbaas-kafka-auto-topic-create-default branch from 394212f to 961dd19 Compare October 23, 2024 17:11
@loosla
Copy link
Contributor

loosla commented Oct 23, 2024

Couple more things that you may want to update 🙏

  1. Would it be possible to update segment_bytes too? 🙏
    Now its default in the documentation is 209715200, however API sets it to 1073741824 by default.

  2. Some fields are missing:

segment_index_bytes is missing in the documentation, however it is set to 10485760 by default.

segment_bytes is missing in the documentation, however it is set to 1073741824 by default.

message_timestamp_difference_max_ms is missing in the documentation, however it is set to 9223372036854776000 by default.

message_format_version is missing in the documentation, however it is set to 3.0-IV1 by default.

Thank you.

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.

3 participants