如何在多个记录处理器之间平衡kinesis碎片? [英] How to balance kinesis shards across several record processor?
问题描述
我目前正在使用Golang版本编写简单的Kinesis客户端库(KCL)。我希望为我的简单KCL提供的功能之一是跨多个记录处理器和EC2实例的负载均衡分片。例如,我有两个记录处理器(将在单独的EC2实例中运行)和四个Kinesis碎片。负载平衡功能将允许每个记录处理器处理两个Kinesis碎片。
我读到Java KCL实现了这一点,但我无法在库中找到实现。我的问题是我将如何在Golang中实现此功能?谢谢。
KCL已经为您做了负载平衡。 (请记住,这仅仅是基础知识,并且随着亚马逊改进逻辑而改变): 你当然是fre e在github上检查KCL的源代码: https://github.com/awslabs/amazon -kinesis-client - 希望这个解释能为你提供更多关于如何理解KCL并使之适应你需求的内容。 I am currently writing the simple Kinesis Client Library (KCL) in Golang version. One of the features that I want it for my simple KCL is load balancing shards across multiple record processors and EC2 instances. For example, I have two record processors (which will run in the separate EC2 instance) and four Kinesis shards. The load balancing feature will allow each record processors to process two Kinesis shards. I read that Java KCL implemented this but I can't find the implementation in the library. My question is how am I going to implement this feature in Golang? Thank you. KCL already does load balancing for you. Here's a basic description of how it works today (keep in mind this is just the basics and is subject to change as Amazon improves the logic): You're of course free to examine the source code for KCL on github: https://github.com/awslabs/amazon-kinesis-client - hopefully this explanation gives you more context for how to understand KCL and adapt it to your needs. 这篇关于如何在多个记录处理器之间平衡kinesis碎片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!