DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
| Table of Contents |
|---|
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: ["Under Discussion"]
...
Describe the problems you are trying to solve.
When remote storage is enabled for a topic, and the consumer is doing backfill, then the data might be read from the remote storage. Currently, Kafka remote storage supports only reading the first remote partition in the given FETCH request. The default value of max.partition.fetch.bytes is configured to 1 MB. Reading one MB of data per FETCH request, increases the round-trip time for the consumer and the cloud storages are often tuned to read data in chunks of 4 MB.
The proposal is to introduce remote.max.partition.fetch.bytes in the Consumer config which allows the user to tune the value depending on their storage plugin. The user might want to optimize the number of calls to remote storage vs amount of bytes returned back to the client in the FETCH response.
Public Interfaces
Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.
A public interface is any change to the following:
- Introduce new
remote.max.partition.fetch.bytesconsumer config, with default value to 1 MB. - Bump FetchRequest to v18 to add the
RemotePartitionMaxBytesfield to propagate the value configured on the consumer to the broker.
Binary log format
The network protocol and api behavior
Any class in the public packages under clientsConfiguration, especially client configuration
org/apache/kafka/common/serialization
org/apache/kafka/common
org/apache/kafka/common/errors
org/apache/kafka/clients/producer
org/apache/kafka/clients/consumer (eventually, once stable)
Monitoring
Command line tools and arguments
- Anything else that will likely break existing users in some way when they upgrade
...
Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.
The proposal is to introduce a new Consumer config: remote.max.partition.fetch.bytes to configure the number of bytes returned from remote storage.
The reason for not reusing the existing the max.partition.fetch.bytes config.
- The default value of
fetch.max.bytesis configured to 50 MB andmax.partition.fetch.bytesis 1 MB. - If the user tunes the
max.partition.fetch.bytesvalue to 4 MB, then it applies for all the FETCH requests. (ie) Reading the data from local storage too. - Assume that the consumer is reading data for a topic with 64 partitions and 16 partition leaders are colocated in a single broker. Then:
- Broker allocates 16 instances of 4 MB buffers which will impact the Young Gen and Old Gen GC.
- Broker does not use BufferPool to allocate the buffers.
- Since
- The existing cannot be reused to read from remote storage.
Compatibility, Deprecation, and Migration Plan
...