- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
#tech #interviewquestions #java #interview #jobinterview #springboot
When a single Kafka topic becomes a bottleneck while others stay idle, the goal is to distribute traffic, storage, and consumption evenly without breaking ordering or reliability.
1️⃣ Increase partitions for the hot topic
Kafka scales within a topic via partitions, not across topics.
Add more partitions to the heavily used topic so load spreads across brokers and consumers.
Ensure the consumer group has at least the same number of consumers as partitions.
Note: ordering is still guaranteed per partition, not globally.
Why it helps:
More partitions → parallel writes → parallel reads → better throughput.
2️⃣ Use a better message key strategy
Uneven keys cause partition skew (one partition gets most traffic).
Revisit the message key:
Avoid constant or low-cardinality keys.
Use composite keys (e.g., userId + region).
Apply hashing carefully to spread records evenly.
Why it helps:
Balanced keys = balanced partitions = balanced brokers.
3️⃣ Split the topic by domain or workload
If one topic handles multiple use cases, split it into multiple logical topics:
orders-created
orders-updated
orders-payments
Route producers based on business intent.
Why it helps:
Reduces contention and isolates high-traffic flows.
4️⃣ Scale consumer groups independently
Add more consumers only for the hot topic’s consumer group.
Keep idle topics with smaller consumer groups to save resources.
Why it helps:
Consumers scale independently per topic.
5️⃣ Apply producer-side throttling or backpressure
Limit producer throughput for the hot topic using:
Rate limiting
Batching and linger settings
Prevents broker overload and stabilizes latency.
Why it helps:
Protects the cluster under traffic spikes.
Summary:
Kafka load is rebalanced by increasing partitions, fixing key distribution, splitting hot topics, scaling consumer groups independently, throttling producers, and redistributing partitions across brokers.
Do Follow @codewith_sushant for more tech tips.
#tech #interview #coder #microservices #javaprogramming
Видео #tech #interviewquestions #java #interview #jobinterview #springboot канала Sushant Kumbhar
1️⃣ Increase partitions for the hot topic
Kafka scales within a topic via partitions, not across topics.
Add more partitions to the heavily used topic so load spreads across brokers and consumers.
Ensure the consumer group has at least the same number of consumers as partitions.
Note: ordering is still guaranteed per partition, not globally.
Why it helps:
More partitions → parallel writes → parallel reads → better throughput.
2️⃣ Use a better message key strategy
Uneven keys cause partition skew (one partition gets most traffic).
Revisit the message key:
Avoid constant or low-cardinality keys.
Use composite keys (e.g., userId + region).
Apply hashing carefully to spread records evenly.
Why it helps:
Balanced keys = balanced partitions = balanced brokers.
3️⃣ Split the topic by domain or workload
If one topic handles multiple use cases, split it into multiple logical topics:
orders-created
orders-updated
orders-payments
Route producers based on business intent.
Why it helps:
Reduces contention and isolates high-traffic flows.
4️⃣ Scale consumer groups independently
Add more consumers only for the hot topic’s consumer group.
Keep idle topics with smaller consumer groups to save resources.
Why it helps:
Consumers scale independently per topic.
5️⃣ Apply producer-side throttling or backpressure
Limit producer throughput for the hot topic using:
Rate limiting
Batching and linger settings
Prevents broker overload and stabilizes latency.
Why it helps:
Protects the cluster under traffic spikes.
Summary:
Kafka load is rebalanced by increasing partitions, fixing key distribution, splitting hot topics, scaling consumer groups independently, throttling producers, and redistributing partitions across brokers.
Do Follow @codewith_sushant for more tech tips.
#tech #interview #coder #microservices #javaprogramming
Видео #tech #interviewquestions #java #interview #jobinterview #springboot канала Sushant Kumbhar
Комментарии отсутствуют
Информация о видео
7 февраля 2026 г. 9:20:35
00:00:13
Другие видео канала





















