SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Building event-driven
microservices with
Kafka Streams
Stathis Souris
Lead Software Engineer
2
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Agenda
• Kafka
• Kafka Streams
• Endpoint Agent
• Kafka Streams Use Cases
• Production Issues
• Takeaways
• Q&A
3
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Why Kafka
• Simple at first!
4
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Why Kafka
• Complicated
5
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Decoupling of data streams
6
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Why Kafka
• Distributed, resilient architecture, fault tolerant
• Horizontal scalability
• High performance (latency of less than 10ms) - real time
• User by known companies
– LinkedIn, Netflix, AirBnb etc
7
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Apache Kafka: Use cases
• Messaging System
• Activity Tracking tool
• Gather metrics from different locations
• Application logs
• Stream processing (Kafka Streams or Spark e.g.)
• Decoupling of systems
• Works with Spark, Flink, Hadoop etc
8
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
What is Kafka Streams?
• Easy data processing and
transformation library within
Kafka
• Standard Java Application
• No need to create a separate
cluster
• Highly scalable, elastic and fault
tolerant (inherits from Kafka)
• Exactly Once Capabilities
• One record at a time processing
(no batching)
• Works for any application size
9
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Kafka Streams Architecture Design
•
10
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Kafka Streams history
• The API / Library was introduced as part of Kafka 0.10 (2016)
• Serious contender to other processing frameworks such as
Spark, Flink, NiFi etc
11
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
About the Endpoint Agent
• Agents that run on users laptops or desktops
• Collect metrics from customer’s browser interactions
• Perform network tests e.g. ping, pathtrace against various targets
• Checks-in every 10 minutes
• Alerts & Reports
12
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
High-level Architecture Overview
13
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Why event-driven microservices?
• Operate at large scale 100K agents
• Complex logic that needs to run at scale
• As real time as possible
• Asynchronous communication
14
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Why Kafka Streams?
✓ Inherits Kafka Streams properties
✓ Simple DSL for
– Aggregations
– Windowing
✓ Streams & Tables
✓ <Key, Value>
Scheduled Tests
16
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Use case
Synthetic tests at an interval
Schedule tests on agents dynamically
Powerful visualization and filtering capabilities
17
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Batch Job approach
• Agent checks-in every 10 minutes
• Batch job runs to assign tests every 15 minutes
• Pull state from various DBs
• Run business logic
• Save assignments
After stress testing:
■ Latency increase as we added more agents
■ Could only scale vertically - not an option at
that point
18
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Event Driven approach
• Stream of check-ins
• Use that stream to power the Scheduler
• Assign tasks on check-in event
19
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Event Driven approach
✓ Application scales with number of
Kafka partitions
✓ Join with GlobalKTables
✓ Run the business logic
✓ Save assignments in KTable
Facts:
➢ All state lives in Kafka
➢ At least once delivery
➢ Materialize assignments in MongoDB:
○ Historical queries
○ Timeline of assignments
20
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Interactive Queries
• Query in-memory KTable for assignments
directly
• Expose through a Rest API
• Very fast
• When State store is temporarily unavailable
use MongoDB query
– zero-downtime deployments
Checkin Reconciler:
React on application
events
22
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Checkin Reconciler
23
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Problem:
■ updating the KTable on every event
■ creating hot partitions that took too long to process
After 20K agents
24
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Use KTable cache
Reduce the commit interval of the application.
StreamsConfig.COMMIT_INTERVAL_MS_CONFIG
Temporary solution
25
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Long term x
Removed repartitioning step and stored active check-ins in Redis instead
Alert Aggregator
27
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Browser Session Metrics
✓ Real User Monitoring events coupled with network
tests
✓ No set interval
✓ Alerter needs binned data
✓ One minute window and emit aggregated metrics
28
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Window operator
Problem:
Alerting use case needs aggregated event to be emitted at the end, not on every update.
29
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Suppress operator
Problems:
Windowed aggregates took to long to reach the Alerter.
30
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Aggregation was delayed?
Closing a window is driven by
events, that advance the stream
time.
Solution:
Created a cron job to generate
events every close window +
grace period to force the window
to close.
31
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Production issues
• Compaction wasn’t working in some cases
• Avoid repartitioning to hot keys
• Interactive queries misbehavior
– Metadata incorrect
– Created loop between services
32
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Key Takeaways
✓ Use KTable cache to de-duplicate events before
sending downstream. Use “commit.interval” to
your advantage.
✓ Avoid hot partition keys if possible especially when
you are going big.
✓ Make sure compaction works for your topics
✓ If you don’t really use RocksDB disable it
✓ Use binary format from the beginning if you are
going big
✓ Kafka as a DB is possible, but don’t overdo it
✓ Small latencies on the processor level can add up
once you have lag (100ms * 10.000 ~= 16min)
33
Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes
Q&A
Twitter: @efsouris
Blogpost:
https://medium.com/thousandeyes-engine
ering/kafka-streams-in-the-endpoint-agent
-670a098ae7a4
Building Event-Driven Microservices using Kafka Streams (Stathis Souris, ThousandEyes)

Weitere ähnliche Inhalte

Was ist angesagt?

Using FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at ScaleUsing FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at ScaleTimothy Spann
 
APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of confluent
 
Streaming and Social Media
Streaming and Social MediaStreaming and Social Media
Streaming and Social MediaJoe Olson
 
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...confluent
 
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...HostedbyConfluent
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...confluent
 
Building Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache KafkaBuilding Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache Kafkaconfluent
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka EcosystemGuido Schmutz
 
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...HostedbyConfluent
 
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, ConfluentApache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, ConfluentHostedbyConfluent
 
Elastically Scaling Kafka Using Confluent
Elastically Scaling Kafka Using ConfluentElastically Scaling Kafka Using Confluent
Elastically Scaling Kafka Using Confluentconfluent
 
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, Google
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, GoogleHybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, Google
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, GoogleHostedbyConfluent
 
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig Narvaez
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig NarvaezServerless Architectures with AWS Lambda and MongoDB Atlas by Sig Narvaez
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig NarvaezData Con LA
 
Processing Real-Time Data at Scale: A streaming platform as a central nervous...
Processing Real-Time Data at Scale: A streaming platform as a central nervous...Processing Real-Time Data at Scale: A streaming platform as a central nervous...
Processing Real-Time Data at Scale: A streaming platform as a central nervous...confluent
 
Continus sql with sql stream builder
Continus sql with sql stream builderContinus sql with sql stream builder
Continus sql with sql stream builderTimothy Spann
 
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...HostedbyConfluent
 
Real time data processing and model inferncing platform with Kafka streams (N...
Real time data processing and model inferncing platform with Kafka streams (N...Real time data processing and model inferncing platform with Kafka streams (N...
Real time data processing and model inferncing platform with Kafka streams (N...KafkaZone
 
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...InfluxData
 
Pipelining the Heroes with Kafka and Graph
Pipelining the Heroes with Kafka and GraphPipelining the Heroes with Kafka and Graph
Pipelining the Heroes with Kafka and Graphconfluent
 
Bridge to Cloud: Using Apache Kafka to Migrate to GCP
Bridge to Cloud: Using Apache Kafka to Migrate to GCPBridge to Cloud: Using Apache Kafka to Migrate to GCP
Bridge to Cloud: Using Apache Kafka to Migrate to GCPconfluent
 

Was ist angesagt? (20)

Using FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at ScaleUsing FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at Scale
 
APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of APAC Kafka Summit - Best Of
APAC Kafka Summit - Best Of
 
Streaming and Social Media
Streaming and Social MediaStreaming and Social Media
Streaming and Social Media
 
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...
Kafka Summit NYC 2017 - Achieving Predictability and Compliance with BNY Mell...
 
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
 
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
Billions of Messages in Real Time: Why Paypal & LinkedIn Trust an Engagement ...
 
Building Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache KafkaBuilding Event-Driven Services with Apache Kafka
Building Event-Driven Services with Apache Kafka
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
 
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
 
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, ConfluentApache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
Apache Kafka and the Data Mesh | Ben Stopford and Michael Noll, Confluent
 
Elastically Scaling Kafka Using Confluent
Elastically Scaling Kafka Using ConfluentElastically Scaling Kafka Using Confluent
Elastically Scaling Kafka Using Confluent
 
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, Google
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, GoogleHybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, Google
Hybrid Streaming Analytics for Apache Kafka Users | Firat Tekiner, Google
 
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig Narvaez
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig NarvaezServerless Architectures with AWS Lambda and MongoDB Atlas by Sig Narvaez
Serverless Architectures with AWS Lambda and MongoDB Atlas by Sig Narvaez
 
Processing Real-Time Data at Scale: A streaming platform as a central nervous...
Processing Real-Time Data at Scale: A streaming platform as a central nervous...Processing Real-Time Data at Scale: A streaming platform as a central nervous...
Processing Real-Time Data at Scale: A streaming platform as a central nervous...
 
Continus sql with sql stream builder
Continus sql with sql stream builderContinus sql with sql stream builder
Continus sql with sql stream builder
 
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
Data in Motion: Building Stream-Based Architectures with Qlik Replicate & Kaf...
 
Real time data processing and model inferncing platform with Kafka streams (N...
Real time data processing and model inferncing platform with Kafka streams (N...Real time data processing and model inferncing platform with Kafka streams (N...
Real time data processing and model inferncing platform with Kafka streams (N...
 
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...
Kai Waehner [Confluent] | Real-Time Streaming Analytics with 100,000 Cars Usi...
 
Pipelining the Heroes with Kafka and Graph
Pipelining the Heroes with Kafka and GraphPipelining the Heroes with Kafka and Graph
Pipelining the Heroes with Kafka and Graph
 
Bridge to Cloud: Using Apache Kafka to Migrate to GCP
Bridge to Cloud: Using Apache Kafka to Migrate to GCPBridge to Cloud: Using Apache Kafka to Migrate to GCP
Bridge to Cloud: Using Apache Kafka to Migrate to GCP
 

Ähnlich wie Building Event-Driven Microservices using Kafka Streams (Stathis Souris, ThousandEyes)

What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1KNIMESlides
 
The role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial InformaticsThe role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial InformaticsAerospike, Inc.
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonLeon Stigter
 
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Amazon Web Services
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Amazon Web Services
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Ltd
 
Rethinking the Database in the IoT Era
Rethinking the Database in the IoT EraRethinking the Database in the IoT Era
Rethinking the Database in the IoT EraInfluxData
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal GemfireIn-Memory Computing Summit
 
In-Memory Data Management Goes Mainstream - OpenSlava 2015
In-Memory Data Management Goes Mainstream - OpenSlava 2015In-Memory Data Management Goes Mainstream - OpenSlava 2015
In-Memory Data Management Goes Mainstream - OpenSlava 2015Software AG
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewForgeRock
 
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...Amazon Web Services
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!KNIMESlides
 
Big Data as easy as 1, 2, 3, ... 4 ... with KNIME
Big Data as easy as 1, 2, 3, ... 4 ... with KNIMEBig Data as easy as 1, 2, 3, ... 4 ... with KNIME
Big Data as easy as 1, 2, 3, ... 4 ... with KNIMERosaria Silipo
 
Growing up fast: Kubernetes and Real-Time Analytic Applications
Growing up fast: Kubernetes and Real-Time Analytic ApplicationsGrowing up fast: Kubernetes and Real-Time Analytic Applications
Growing up fast: Kubernetes and Real-Time Analytic ApplicationsDoKC
 
Serverless AWS reInvent 2019 recap
Serverless AWS reInvent 2019 recapServerless AWS reInvent 2019 recap
Serverless AWS reInvent 2019 recapDaniel Zivkovic
 
Stream processing for the practitioner: Blueprints for common stream processi...
Stream processing for the practitioner: Blueprints for common stream processi...Stream processing for the practitioner: Blueprints for common stream processi...
Stream processing for the practitioner: Blueprints for common stream processi...Aljoscha Krettek
 
KNIME Software Overview
KNIME Software OverviewKNIME Software Overview
KNIME Software OverviewKNIMESlides
 
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudRoman Weber
 

Ähnlich wie Building Event-Driven Microservices using Kafka Streams (Stathis Souris, ThousandEyes) (20)

What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1
 
The role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial InformaticsThe role of NoSQL in the Next Generation of Financial Informatics
The role of NoSQL in the Next Generation of Financial Informatics
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and Tekton
 
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
 
Rethinking the Database in the IoT Era
Rethinking the Database in the IoT EraRethinking the Database in the IoT Era
Rethinking the Database in the IoT Era
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
 
In-Memory Data Management Goes Mainstream - OpenSlava 2015
In-Memory Data Management Goes Mainstream - OpenSlava 2015In-Memory Data Management Goes Mainstream - OpenSlava 2015
In-Memory Data Management Goes Mainstream - OpenSlava 2015
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - Overview
 
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...
Giving credit where credit’s due - myFICO’s cloud transformation - SVC204 - S...
 
Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!Big Data with KNIME is as easy as 1, 2, 3, ...4!
Big Data with KNIME is as easy as 1, 2, 3, ...4!
 
Big Data as easy as 1, 2, 3, ... 4 ... with KNIME
Big Data as easy as 1, 2, 3, ... 4 ... with KNIMEBig Data as easy as 1, 2, 3, ... 4 ... with KNIME
Big Data as easy as 1, 2, 3, ... 4 ... with KNIME
 
Growing up fast: Kubernetes and Real-Time Analytic Applications
Growing up fast: Kubernetes and Real-Time Analytic ApplicationsGrowing up fast: Kubernetes and Real-Time Analytic Applications
Growing up fast: Kubernetes and Real-Time Analytic Applications
 
Serverless AWS reInvent 2019 recap
Serverless AWS reInvent 2019 recapServerless AWS reInvent 2019 recap
Serverless AWS reInvent 2019 recap
 
Stream processing for the practitioner: Blueprints for common stream processi...
Stream processing for the practitioner: Blueprints for common stream processi...Stream processing for the practitioner: Blueprints for common stream processi...
Stream processing for the practitioner: Blueprints for common stream processi...
 
KNIME Software Overview
KNIME Software OverviewKNIME Software Overview
KNIME Software Overview
 
Iot in-production
Iot in-productionIot in-production
Iot in-production
 
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloud
 

Mehr von London Microservices

Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...London Microservices
 
Log and control all service-to-service traffic in one place (Kelvin Wong)
Log and control all service-to-service traffic in one place (Kelvin Wong)Log and control all service-to-service traffic in one place (Kelvin Wong)
Log and control all service-to-service traffic in one place (Kelvin Wong)London Microservices
 
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)London Microservices
 
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)London Microservices
 
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...London Microservices
 
Robots and Food (Orfeo Nicolai, Karakuri)
Robots and Food (Orfeo Nicolai, Karakuri)Robots and Food (Orfeo Nicolai, Karakuri)
Robots and Food (Orfeo Nicolai, Karakuri)London Microservices
 
Cloud Native Patterns (Jamie Dobson, Container Solutions)
Cloud Native Patterns (Jamie Dobson, Container Solutions)Cloud Native Patterns (Jamie Dobson, Container Solutions)
Cloud Native Patterns (Jamie Dobson, Container Solutions)London Microservices
 
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)London Microservices
 

Mehr von London Microservices (8)

Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
Lean microservices through ahead of time compilation (Tobias Piper, Loveholid...
 
Log and control all service-to-service traffic in one place (Kelvin Wong)
Log and control all service-to-service traffic in one place (Kelvin Wong)Log and control all service-to-service traffic in one place (Kelvin Wong)
Log and control all service-to-service traffic in one place (Kelvin Wong)
 
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)
Event Streaming, the hard way by (CĂŠsar Luis AlvargonzĂĄlez, Revolut)
 
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)
Hidden secrets of the Deliveroo Application Platform (Ben Cordero, Deliveroo)
 
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...
Reliability in Microservices: Embracing Failure (CĂŠsar Luis AlvargonzĂĄlez, Re...
 
Robots and Food (Orfeo Nicolai, Karakuri)
Robots and Food (Orfeo Nicolai, Karakuri)Robots and Food (Orfeo Nicolai, Karakuri)
Robots and Food (Orfeo Nicolai, Karakuri)
 
Cloud Native Patterns (Jamie Dobson, Container Solutions)
Cloud Native Patterns (Jamie Dobson, Container Solutions)Cloud Native Patterns (Jamie Dobson, Container Solutions)
Cloud Native Patterns (Jamie Dobson, Container Solutions)
 
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)
Designing an extensible tooling platform (Dmitry Zeldin, Skyscanner)
 

KĂźrzlich hochgeladen

WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 

KĂźrzlich hochgeladen (20)

WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 

Building Event-Driven Microservices using Kafka Streams (Stathis Souris, ThousandEyes)

  • 1. Building event-driven microservices with Kafka Streams Stathis Souris Lead Software Engineer
  • 2. 2 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Agenda • Kafka • Kafka Streams • Endpoint Agent • Kafka Streams Use Cases • Production Issues • Takeaways • Q&A
  • 3. 3 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Why Kafka • Simple at rst!
  • 4. 4 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Why Kafka • Complicated
  • 5. 5 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Decoupling of data streams
  • 6. 6 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Why Kafka • Distributed, resilient architecture, fault tolerant • Horizontal scalability • High performance (latency of less than 10ms) - real time • User by known companies – LinkedIn, Netflix, AirBnb etc
  • 7. 7 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Apache Kafka: Use cases • Messaging System • Activity Tracking tool • Gather metrics from different locations • Application logs • Stream processing (Kafka Streams or Spark e.g.) • Decoupling of systems • Works with Spark, Flink, Hadoop etc
  • 8. 8 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes What is Kafka Streams? • Easy data processing and transformation library within Kafka • Standard Java Application • No need to create a separate cluster • Highly scalable, elastic and fault tolerant (inherits from Kafka) • Exactly Once Capabilities • One record at a time processing (no batching) • Works for any application size
  • 9. 9 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Kafka Streams Architecture Design •
  • 10. 10 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Kafka Streams history • The API / Library was introduced as part of Kafka 0.10 (2016) • Serious contender to other processing frameworks such as Spark, Flink, NiFi etc
  • 11. 11 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes About the Endpoint Agent • Agents that run on users laptops or desktops • Collect metrics from customer’s browser interactions • Perform network tests e.g. ping, pathtrace against various targets • Checks-in every 10 minutes • Alerts & Reports
  • 12. 12 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes High-level Architecture Overview
  • 13. 13 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Why event-driven microservices? • Operate at large scale 100K agents • Complex logic that needs to run at scale • As real time as possible • Asynchronous communication
  • 14. 14 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Why Kafka Streams? ✓ Inherits Kafka Streams properties ✓ Simple DSL for – Aggregations – Windowing ✓ Streams & Tables ✓ <Key, Value>
  • 16. 16 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Use case Synthetic tests at an interval Schedule tests on agents dynamically Powerful visualization and filtering capabilities
  • 17. 17 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Batch Job approach • Agent checks-in every 10 minutes • Batch job runs to assign tests every 15 minutes • Pull state from various DBs • Run business logic • Save assignments After stress testing: ■ Latency increase as we added more agents ■ Could only scale vertically - not an option at that point
  • 18. 18 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Event Driven approach • Stream of check-ins • Use that stream to power the Scheduler • Assign tasks on check-in event
  • 19. 19 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Event Driven approach ✓ Application scales with number of Kafka partitions ✓ Join with GlobalKTables ✓ Run the business logic ✓ Save assignments in KTable Facts: ➢ All state lives in Kafka ➢ At least once delivery ➢ Materialize assignments in MongoDB: ○ Historical queries ○ Timeline of assignments
  • 20. 20 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Interactive Queries • Query in-memory KTable for assignments directly • Expose through a Rest API • Very fast • When State store is temporarily unavailable use MongoDB query – zero-downtime deployments
  • 21. Checkin Reconciler: React on application events
  • 22. 22 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Checkin Reconciler
  • 23. 23 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Problem: ■ updating the KTable on every event ■ creating hot partitions that took too long to process After 20K agents
  • 24. 24 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Use KTable cache Reduce the commit interval of the application. StreamsConfig.COMMIT_INTERVAL_MS_CONFIG Temporary solution
  • 25. 25 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Long term x Removed repartitioning step and stored active check-ins in Redis instead
  • 27. 27 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Browser Session Metrics ✓ Real User Monitoring events coupled with network tests ✓ No set interval ✓ Alerter needs binned data ✓ One minute window and emit aggregated metrics
  • 28. 28 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Window operator Problem: Alerting use case needs aggregated event to be emitted at the end, not on every update.
  • 29. 29 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Suppress operator Problems: Windowed aggregates took to long to reach the Alerter.
  • 30. 30 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Aggregation was delayed? Closing a window is driven by events, that advance the stream time. Solution: Created a cron job to generate events every close window + grace period to force the window to close.
  • 31. 31 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Production issues • Compaction wasn’t working in some cases • Avoid repartitioning to hot keys • Interactive queries misbehavior – Metadata incorrect – Created loop between services
  • 32. 32 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Key Takeaways ✓ Use KTable cache to de-duplicate events before sending downstream. Use “commit.interval” to your advantage. ✓ Avoid hot partition keys if possible especially when you are going big. ✓ Make sure compaction works for your topics ✓ If you don’t really use RocksDB disable it ✓ Use binary format from the beginning if you are going big ✓ Kafka as a DB is possible, but don’t overdo it ✓ Small latencies on the processor level can add up once you have lag (100ms * 10.000 ~= 16min)
  • 33. 33 Copyright Š2020 ThousandEyes, Inc. All Rights Reserved.  @ThousandEyes Q&A Twitter: @efsouris Blogpost: https://medium.com/thousandeyes-engine ering/kafka-streams-in-the-endpoint-agent -670a098ae7a4