The Fifth Elephant 2019

Gathering of 1000+ practitioners from the data ecosystem

Real-time fraud detection with Kafka Streams

Submitted by Navinder Pal Singh Brar (@navinder) on Jun 5, 2019

Session type: Short talk of 20 mins Status: Rejected

Abstract

One of the major use cases for stream processing is real-time fraud detection. Walmart just launched a new subscription package where it provides free delivery for users who are enrolled with a monthly subscription, which can be misused sometimes. Since the fraud detection model runs on each transaction and comes with very tight SLAs, we had to increase availability in our Kafka streams cluster and reduce latency. I will be discussing this architecture along with problems we faced, such as frequent rebalancing, high latency, invariably large assignment size, and excessive data movement after every deployment. The below features will be discussed in detail:
•Smart Client: A client library to query the precise machine and get data for a customer to reduce interactive queries
•Read from replicas: During bulk ingestion of events, CPU usage is at the peak in the machines which leads to high latency, so we had to support read from replicas to counter that
•Read while rebalancing: During rebalancing, Streams cluster doesn’t serve queries, but since availability is of foremost importance we enabled reads during rebalancing
•Reading from a store of specific partition: Currently, Kafka streams iterates over each partition of a store via composite stores to find the key, we enabled direct read into the partition where the key is present
•Backup and Restore feature: Developed backup and restore feature for all the data stored in RocksDB, if the state gets corrupted due to some bug or any other reasons
Key Takeaways:
•Lessons learned from using Kafka streams as data as a service
•Modifying Kafka Streams to fit availability-first use cases

Outline

Key Takeaways:
•Lessons learned from using Kafka streams as data as a service
•Modifying Kafka Streams to fit availability-first use cases

Requirements

Basic understanding of Kafka Streams

Speaker bio

Navinder is working as a data engineer in Walmart Labs where he has been working with Kafka ecosystem for the last couple of years, especially Kafka Streams and created a new platform on top of it to suit their needs to process billions of events per day in real time and trigger models on each event. He has been active in contributing back to Kafka Streams and has patented few features as well. He is interested in solving complex problems and distributed systems and likes to spend time in gym and boxing ring in his spare time.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('You need to be a participant to comment.') }}

{{ formTitle }}
{{ gettext('Post a comment...') }}
{{ gettext('New comment') }}

{{ errorMsg }}