SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Migrating Applications to Serverless
Apache Kafka and KSQL
Tim Berglund
S e s s i o n I D
Sr. Director, Developer Relations
Confluent
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Our Movie Rating Service, Legacy Edition
• Users rate movies, ratings go into Kafka
• Monolithic, database-centric application calculates averages
• Serves them to users through a web UI and API
Movie
Ratings
Users
Movies
Top Rated Movies
My Favorite Movie
Moviegoers
Kafka served well
• Decouples event input from processing
• Easily understood abstraction for event processing
• Not exactly a pleasure to operate, but we can’t complain
Movie
Ratings
Users
Movies
Top Rated Movies
My Favorite Movie
Moviegoers
Or can we?
Our Monolith’s Problems
• It will do a bad job managing complexity as our service grows
• The Kafka Consumer code is bespoke
• It is a textbook pre-cloud architecture
• We cannot trivially scale to larger message volumes
Movie
Ratings
Users
Movies
Top Rated Movies
My Favorite Movie
Moviegoers
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Our Refactoring Plan
• Capture Users and Movies as Kafka topics
• Migrate all topics to Confluent Cloud using Confluent Replicator
• Refactor monolith to microservices
• Keep web UI nearly untouched
• Never touch the on-prem system until the migration is complete
Movie
Ratings
Users
Movies
Top Rated Movies
My Favorite Movie
Moviegoers
Step One: Fewer Databases
• Use Kafka Connect to extract Users and Movies tables to Kafka topics
Movie
Ratings
Moviegoers
Movies
Users
Kafka
Connect
Step Two: Spin up a Confluent Cloud cluster
• We want to get out of the business of managing Kafka ourselves
Movie
Ratings
Movies
Users
Step Three: Deploy Confluent Replicator
• Use Kafka Connect to extract Users and Movies tables to Kafka topics
Movie
Ratings
Movies
Users
Movie
Ratings
Movies
Users
Replicator
Replicator
Replicator
Step Four: Convert to KSQL
• Bespoke Consumer code implements non-differentiated functionality
Movie
Ratings
Movies
Users
CREATE TABLE movie_ratings AS
SELECT title,
SUM(rating)/COUNT(rating) AS avg_rating,
COUNT(rating) AS num_ratings
FROM ratings
LEFT OUTER JOIN movies
ON ratings.movie_id = movies.movie_id
GROUP BY title;
Step Four: Convert to KSQL
• The rating averaging query
Movie
Ratings
Movies
Users
Rated
Movies
KSQL
magic goes here
Step Four: Convert to KSQL
• The user favorite query
Movie
Ratings
Movies
Users
Rated
Movies
KSQL
magic goes here
more
KSQL
magic goes here
User
Favorites
Step Five: Extract the rating average service
• Now serve rating averages from KSQL output
• Monolith no longer serves these results
Rating Averages
Rated
Movies
Step Six: Extract the user favorite service
• Now serve rating averages from KSQL output
• Monolith no longer serves these results
User Favorites User
Favorites
Step Seven: Stand down the monolith
• Now serve rating averages from KSQL output
• Monolith no longer serves these results
User Favorites
Rated Movies
User
Favorites
Movie
Ratings
Moviegoers
Rated
Movies
so much
KSQL
magic
Movies
Users
Step Eight: Stand down Replicator
• All data is in Confluent Cloud now
• For hybrid on-prem/cloud deployment
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tim Berglund
@tlberglund
https://kafka-tutorials.confluent.io
https://slackpass.io/confluentcommunity
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

PDF
Topic and schema management-meetupberlin
confluent
 
PDF
Bridging the Gap: Connecting AWS and Kafka
Pengfei (Jason) Li
 
PDF
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent
 
PPTX
Change Data Capture using Kafka
Akash Vacher
 
PPTX
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
HostedbyConfluent
 
PDF
Gwen Shapira, Confluent | Kafka Summit 2020 Keynote | Kafka’s New Architecture
confluent
 
PDF
Look how easy it is to go from events to blazing-fast analytics! | Neha Pawar...
HostedbyConfluent
 
PDF
Tradeoffs in Distributed Systems Design: Is Kafka The Best? (Ben Stopford and...
HostedbyConfluent
 
Topic and schema management-meetupberlin
confluent
 
Bridging the Gap: Connecting AWS and Kafka
Pengfei (Jason) Li
 
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent
 
Change Data Capture using Kafka
Akash Vacher
 
Monitoring and Resiliency Testing our Apache Kafka Clusters at Goldman Sachs ...
HostedbyConfluent
 
Gwen Shapira, Confluent | Kafka Summit 2020 Keynote | Kafka’s New Architecture
confluent
 
Look how easy it is to go from events to blazing-fast analytics! | Neha Pawar...
HostedbyConfluent
 
Tradeoffs in Distributed Systems Design: Is Kafka The Best? (Ben Stopford and...
HostedbyConfluent
 

What's hot (20)

PDF
StreamSQL Feature Store (Apache Pulsar Summit)
Simba Khadder
 
PPTX
Building an Event Bus at Scale
jimriecken
 
PPTX
Encrypting Kafka messages at rest to secure applications | Robert Barnes, Has...
HostedbyConfluent
 
PPTX
Building a derived data store using Kafka
Venu Ryali
 
PPTX
Introduction to Kafka
Akash Vacher
 
ODP
Kafka aws
Ariel Moskovich
 
PDF
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Nitin Kumar
 
PPTX
How to Lock Down Apache Kafka and Keep Your Streams Safe
confluent
 
PPTX
Fundamentals and Architecture of Apache Kafka
Angelo Cesaro
 
PPTX
Confluent building a real-time streaming platform using kafka streams and k...
Thomas Alex
 
PPTX
Apache kafka
Long Nguyen
 
PDF
Organic Growth and A Good Night Sleep: Effective Kafka Operations at Pinteres...
confluent
 
PDF
Oops! I started a broker | Yinon Kahta, Taboola
HostedbyConfluent
 
PPTX
Distributed Kafka Architecture Taboola Scale
Apache Kafka TLV
 
PDF
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
LINE Corporation
 
PDF
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
HostedbyConfluent
 
PDF
Introduction to apache kafka
Dimitris Kontokostas
 
PDF
Becoming Protocol-Agnostic with Kafka, REST, GraphQL & gRPC | Tyler Mills, Sm...
HostedbyConfluent
 
PPTX
Capture the Streams of Database Changes
confluent
 
PDF
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
HostedbyConfluent
 
StreamSQL Feature Store (Apache Pulsar Summit)
Simba Khadder
 
Building an Event Bus at Scale
jimriecken
 
Encrypting Kafka messages at rest to secure applications | Robert Barnes, Has...
HostedbyConfluent
 
Building a derived data store using Kafka
Venu Ryali
 
Introduction to Kafka
Akash Vacher
 
Kafka aws
Ariel Moskovich
 
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Nitin Kumar
 
How to Lock Down Apache Kafka and Keep Your Streams Safe
confluent
 
Fundamentals and Architecture of Apache Kafka
Angelo Cesaro
 
Confluent building a real-time streaming platform using kafka streams and k...
Thomas Alex
 
Apache kafka
Long Nguyen
 
Organic Growth and A Good Night Sleep: Effective Kafka Operations at Pinteres...
confluent
 
Oops! I started a broker | Yinon Kahta, Taboola
HostedbyConfluent
 
Distributed Kafka Architecture Taboola Scale
Apache Kafka TLV
 
Building a company-wide data pipeline on Apache Kafka - engineering for 150 b...
LINE Corporation
 
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
HostedbyConfluent
 
Introduction to apache kafka
Dimitris Kontokostas
 
Becoming Protocol-Agnostic with Kafka, REST, GraphQL & gRPC | Tyler Mills, Sm...
HostedbyConfluent
 
Capture the Streams of Database Changes
confluent
 
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
HostedbyConfluent
 
Ad

Similar to Migrating applications to serverless Apache Kafka + KSQL (20)

PDF
Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro...
confluent
 
PDF
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
confluent
 
PDF
All Streams Ahead! ksqlDB Workshop ANZ
confluent
 
PDF
Strategies For Migrating From SQL to NoSQL — The Apache Kafka Way
ScyllaDB
 
PDF
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
HostedbyConfluent
 
PDF
Concepts and Patterns for Streaming Services with Kafka
QAware GmbH
 
PDF
APAC ksqlDB Workshop
confluent
 
PDF
A Tour of Apache Kafka
confluent
 
PDF
Introduction to Apache Kafka and why it matters - Madrid
Paolo Castagna
 
PDF
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
confluent
 
PDF
Jug - ecosystem
Florent Ramiere
 
PDF
Build a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud Services
confluent
 
PDF
Apache Kafka as Event Streaming Platform for Microservice Architectures
Kai Wähner
 
PDF
Chti jug - 2018-06-26
Florent Ramiere
 
PDF
Big Data LDN 2017: Look Ma, No Code! Building Streaming Data Pipelines With A...
Matt Stubbs
 
PDF
Kafka Vienna Meetup 020719
Patrik Kleindl
 
PDF
Architecting Microservices Applications with Instant Analytics
confluent
 
PDF
Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)
Kai Wähner
 
PDF
KSQL Intro
confluent
 
PPTX
Unlock value with Confluent and AWS.pptx
Ahmed791434
 
Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro...
confluent
 
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
confluent
 
All Streams Ahead! ksqlDB Workshop ANZ
confluent
 
Strategies For Migrating From SQL to NoSQL — The Apache Kafka Way
ScyllaDB
 
Applying ML on your Data in Motion with AWS and Confluent | Joseph Morais, Co...
HostedbyConfluent
 
Concepts and Patterns for Streaming Services with Kafka
QAware GmbH
 
APAC ksqlDB Workshop
confluent
 
A Tour of Apache Kafka
confluent
 
Introduction to Apache Kafka and why it matters - Madrid
Paolo Castagna
 
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
confluent
 
Jug - ecosystem
Florent Ramiere
 
Build a Bridge to Cloud with Apache Kafka® for Data Analytics Cloud Services
confluent
 
Apache Kafka as Event Streaming Platform for Microservice Architectures
Kai Wähner
 
Chti jug - 2018-06-26
Florent Ramiere
 
Big Data LDN 2017: Look Ma, No Code! Building Streaming Data Pipelines With A...
Matt Stubbs
 
Kafka Vienna Meetup 020719
Patrik Kleindl
 
Architecting Microservices Applications with Instant Analytics
confluent
 
Apache Kafka as Event-Driven Open Source Streaming Platform (Prague Meetup)
Kai Wähner
 
KSQL Intro
confluent
 
Unlock value with Confluent and AWS.pptx
Ahmed791434
 
Ad

More from confluent (20)

PDF
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
confluent
 
PPTX
Webinar Think Right - Shift Left - 19-03-2025.pptx
confluent
 
PDF
Migration, backup and restore made easy using Kannika
confluent
 
PDF
Five Things You Need to Know About Data Streaming in 2025
confluent
 
PDF
Data in Motion Tour Seoul 2024 - Keynote
confluent
 
PDF
Data in Motion Tour Seoul 2024 - Roadmap Demo
confluent
 
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
 
PDF
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
confluent
 
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
confluent
 
PDF
Build a Real-Time Decision Support Application for Financial Market Traders w...
confluent
 
PDF
Strumenti e Strategie di Stream Governance con Confluent Platform
confluent
 
PDF
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
confluent
 
PDF
Building Real-Time Gen AI Applications with SingleStore and Confluent
confluent
 
PDF
Unlocking value with event-driven architecture by Confluent
confluent
 
PDF
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
confluent
 
PDF
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
PDF
Building API data products on top of your real-time data infrastructure
confluent
 
PDF
Speed Wins: From Kafka to APIs in Minutes
confluent
 
PDF
Evolving Data Governance for the Real-time Streaming and AI Era
confluent
 
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
confluent
 
Webinar Think Right - Shift Left - 19-03-2025.pptx
confluent
 
Migration, backup and restore made easy using Kannika
confluent
 
Five Things You Need to Know About Data Streaming in 2025
confluent
 
Data in Motion Tour Seoul 2024 - Keynote
confluent
 
Data in Motion Tour Seoul 2024 - Roadmap Demo
confluent
 
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
 
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
confluent
 
Data in Motion Tour 2024 Riyadh, Saudi Arabia
confluent
 
Build a Real-Time Decision Support Application for Financial Market Traders w...
confluent
 
Strumenti e Strategie di Stream Governance con Confluent Platform
confluent
 
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
confluent
 
Building Real-Time Gen AI Applications with SingleStore and Confluent
confluent
 
Unlocking value with event-driven architecture by Confluent
confluent
 
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
confluent
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
Building API data products on top of your real-time data infrastructure
confluent
 
Speed Wins: From Kafka to APIs in Minutes
confluent
 
Evolving Data Governance for the Real-time Streaming and AI Era
confluent
 

Recently uploaded (20)

PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Software Development Methodologies in 2025
KodekX
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 

Migrating applications to serverless Apache Kafka + KSQL

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Migrating Applications to Serverless Apache Kafka and KSQL Tim Berglund S e s s i o n I D Sr. Director, Developer Relations Confluent
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 3. Our Movie Rating Service, Legacy Edition • Users rate movies, ratings go into Kafka • Monolithic, database-centric application calculates averages • Serves them to users through a web UI and API Movie Ratings Users Movies Top Rated Movies My Favorite Movie Moviegoers
  • 4. Kafka served well • Decouples event input from processing • Easily understood abstraction for event processing • Not exactly a pleasure to operate, but we can’t complain Movie Ratings Users Movies Top Rated Movies My Favorite Movie Moviegoers
  • 6. Our Monolith’s Problems • It will do a bad job managing complexity as our service grows • The Kafka Consumer code is bespoke • It is a textbook pre-cloud architecture • We cannot trivially scale to larger message volumes Movie Ratings Users Movies Top Rated Movies My Favorite Movie Moviegoers
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. Our Refactoring Plan • Capture Users and Movies as Kafka topics • Migrate all topics to Confluent Cloud using Confluent Replicator • Refactor monolith to microservices • Keep web UI nearly untouched • Never touch the on-prem system until the migration is complete Movie Ratings Users Movies Top Rated Movies My Favorite Movie Moviegoers
  • 9. Step One: Fewer Databases • Use Kafka Connect to extract Users and Movies tables to Kafka topics Movie Ratings Moviegoers Movies Users Kafka Connect
  • 10. Step Two: Spin up a Confluent Cloud cluster • We want to get out of the business of managing Kafka ourselves Movie Ratings Movies Users
  • 11. Step Three: Deploy Confluent Replicator • Use Kafka Connect to extract Users and Movies tables to Kafka topics Movie Ratings Movies Users Movie Ratings Movies Users Replicator Replicator Replicator
  • 12. Step Four: Convert to KSQL • Bespoke Consumer code implements non-differentiated functionality Movie Ratings Movies Users CREATE TABLE movie_ratings AS SELECT title, SUM(rating)/COUNT(rating) AS avg_rating, COUNT(rating) AS num_ratings FROM ratings LEFT OUTER JOIN movies ON ratings.movie_id = movies.movie_id GROUP BY title;
  • 13. Step Four: Convert to KSQL • The rating averaging query Movie Ratings Movies Users Rated Movies KSQL magic goes here
  • 14. Step Four: Convert to KSQL • The user favorite query Movie Ratings Movies Users Rated Movies KSQL magic goes here more KSQL magic goes here User Favorites
  • 15. Step Five: Extract the rating average service • Now serve rating averages from KSQL output • Monolith no longer serves these results Rating Averages Rated Movies
  • 16. Step Six: Extract the user favorite service • Now serve rating averages from KSQL output • Monolith no longer serves these results User Favorites User Favorites
  • 17. Step Seven: Stand down the monolith • Now serve rating averages from KSQL output • Monolith no longer serves these results User Favorites Rated Movies User Favorites Movie Ratings Moviegoers Rated Movies so much KSQL magic Movies Users
  • 18. Step Eight: Stand down Replicator • All data is in Confluent Cloud now • For hybrid on-prem/cloud deployment
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tim Berglund @tlberglund https://kafka-tutorials.confluent.io https://slackpass.io/confluentcommunity
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.