Multi-kafka for high availability
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- kafka, python
調査の方向性
Start by running the provided asyncio example with two from_kafka_batched sources and an a.union(b) sink, then stop one Kafka cluster to reproduce the freeze. Trace the asynchronous Kafka source and union behavior to identify where progress stops. Done means the combined stream continues handling the available cluster when the other cluster is stopped, with coverage for the failure case.
索引モデルが issue の本文から書いたものです。
説明
We are setting up Kafka in multiple data centers to achieve high availability. I expected that Streamz could do a union between both of these clusters. Everything works as expected, but when I stop one of the Kafka clusters, the stream freezes. I'm thinking there is a callback somewhere that is blocking operations?
import asyncio
import confluent_kafka as ck
from streamz import from_kafka_batched
async def produce(broker, cluster_id, topic):
p = ck.Producer({'bootstrap.servers': broker})
for i in range(100000):
p.poll(0)
p.produce(topic, 'cluster-{} value-{}'.format(cluster_id, i))
p.flush(timeout=0.5)
await asyncio.sleep(1)
async def main():
topic = 'test-topic'
args1 = {'bootstrap.servers': 'localhost:9092', 'group.id': 'test-group'}
args2 = {'bootstrap.servers': 'localhost:9093', 'group.id': 'test-group'}
a = from_kafka_batched(topic, args1, npartitions=1, start=True,
asynchronous=True)
b = from_kafka_batched(topic, args2, npartitions=1, start=True,
asynchronous=True)
a.union(b).sink(print)
asyncio.create_task(produce('localhost:9092', 1, topic))
asyncio.create_task(produce('localhost:9093', 2, topic))
while True:
await asyncio.sleep(1)
if __name__ == '__main__':
asyncio.run(main())
- 主要言語
- Python
- スター
- 1.3k
- フォーク
- 149
- 平均マージ
- 17時間 39分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-streamz/streamz のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
python-streamz/streamz#481 · コメント 4 件 ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
python-streamz/streamz#480 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-streamz/streamz#479 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-streamz/streamz#478 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 10/100
python-streamz/streamz#476 · コメント 17 件 · リアクション 2 件 ·
python-streamz/streamz の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·