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

1.03.5 Kafka Performance Issue Analysis & Investigation - Part2.5 - Research Streaming API capabilities and support for Node #368

Closed
2 tasks done
mdebarros opened this issue Jul 18, 2018 · 1 comment
Assignees
Labels
oss-pisp OSS PISP team's items - stories, bugs, epics story
Milestone

Comments

@mdebarros
Copy link
Member

mdebarros commented Jul 18, 2018

Goal:

  1. As a contributor
    I would like to perform Kafka Performance Issue Analysis & Investigation
    so that a viable solution can be identified and recommended for implementation
  2. As an FSP
    I would want the development team to do analysis regarding Kafka performance issue
    so that transfers can be performant

Tasks:

  • Kafka Performance Environment - Research Exactly-once Semantics via the Streaming API and identify if NodeJs is able to leverage on this. [ @mdebarros ]

Follow-up story - #362


Acceptance Criteria:

  • Document Research Findings

Dependencies:

  • n/a

Accountability:

@mdebarros mdebarros self-assigned this Jul 18, 2018
@mdebarros mdebarros added story oss-pisp OSS PISP team's items - stories, bugs, epics labels Jul 18, 2018
@mdebarros mdebarros changed the title temp 1.03.5 Kafka Performance Issue Analysis & Investigation - Part2.5 - Validate Test results on Stable Environment Jul 18, 2018
@mdebarros mdebarros changed the title 1.03.5 Kafka Performance Issue Analysis & Investigation - Part2.5 - Validate Test results on Stable Environment 1.03.5 Kafka Performance Issue Analysis & Investigation - Part2.5 - Research Streaming API capabilities and support for Node Jul 19, 2018
@elnyry-sam-k elnyry-sam-k added this to the Sprint 3.2 milestone Jul 19, 2018
@mdebarros
Copy link
Member Author

Findings

Native Kafka Streaming API Support

There is very little support for native Kafka Streaming API capabilities within Node-rdkafka due to the dependency on the Librdkafka which has not implemented this functionality.
(Ref: confluentinc/librdkafka#1248)

Note that Node-rdkafka does expose a Streaming API, but it does not support the same capabilites as a Native Kafka Streaming API (which requires EOS support for the processing.guarantee=exactly_once config). It is merely a Stream wrapped around the existing Librdkafka implementation at a Node level. It is also important to note that this Streaming API is not as fast as the Standard API which has been implemented in the Common Streaming Library. (Ref: https://github.com/Blizzard/node-rdkafka/blob/master/lib/kafka-consumer-stream.js).

Exactly-Once Semantic Support (EOS)

EOS capabilities are not supported by Librdkafka (and thus Node-rdKafka). However Librdkafka hope to have it implemented by Q4 2018. (Ref: confluentinc/librdkafka#1308).

Common Streaming Library support for EOS

In the Common Streaming Library we have followed a similar approach to the following post: SOHU-Co/kafka-node#548 by implementing the Async Queue/DeQueue + Consumer Pause when processing a message. This however doesn't provide the Exactly-Once semantic without some additional configurations & implementation done by the Client Implementation which is covered in the next section.

Mojaloop handles EOS by the following approach:

  1. Async Queue/Dequeue and pausing the Kafka Consumer while processing consumed messages ~ (capability provided by the Common Streaming Library)
  2. Enforcing a single Partition to ensure the ordering of messages by a single Consumer ~ ( done by the configuration of the Topic)
  3. Commit the Kafka Index after each message has been processed (regardless of batches or single messages).

Take note that the point 3. will not be applicable when using auto-commits or only committing the index at the end of processing a batch of messages. It is up to the Client implementation to ensure that point 3. is implemented to ensure the Exactly-Once semantic.

mdebarros pushed a commit to mdebarros/project that referenced this issue May 12, 2021
* updated dependencies, added the delete payyload fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oss-pisp OSS PISP team's items - stories, bugs, epics story
Projects
None yet
Development

No branches or pull requests

2 participants