Keep your Data Close and your Caches Hotter using Apache Kafka, Connect and KSQL @gamussa | @riferrei | #IMCSummit @gamussa | @riferrei | #IMCSummit
2 @gamussa | @riferrei | #IMCSummit
Raffle, yeah π
Raffle, yeah π Follow @gamussa @riferrei πΉ π½ π Tag @gamussa @riferrei With #IMCSummit
4 Data is only useful if it is Fresh and Contextual @gamussa | @riferrei | #IMCSummit
@gamussa | @riferrei | #IMCSummit
What if the airbag deploys 30 seconds after the collision? @gamussa | @riferrei | #IMCSummit
@gamussa | @riferrei | #IMCSummit
December 6th, 2010: Commuter rail train hits elderly driver @gamussa | @riferrei | #IMCSummit
7 What if the information about the commuter rail train is outdated? @gamussa | @riferrei | #IMCSummit
8 Caches can be a Solution for Data that is Fresh @gamussa | @riferrei | #IMCSummit
9 APIs need to access data freely and easily Read API Cache Write Read Write @gamussa | @riferrei | #IMCSummit
9 APIs need to access data freely and easily Data should never be treated as a β scarce resource in applications Read API Cache Write Read Write @gamussa | @riferrei | #IMCSummit
9 APIs need to access data freely and easily Data should never be treated as a β scarce resource in applications Read API Cache Latency should be kept as minimal to β Write ensure a better user experience Read Write @gamussa | @riferrei | #IMCSummit
9 APIs need to access data freely and easily Data should never be treated as a β scarce resource in applications Read API Cache Latency should be kept as minimal to β Write ensure a better user experience Data should be not be static: keep the β Read data fresh continuously Write @gamussa | @riferrei | #IMCSummit
9 APIs need to access data freely and easily Data should never be treated as a β scarce resource in applications Read API Cache Latency should be kept as minimal to β Write ensure a better user experience Data should be not be static: keep the β Read data fresh continuously Write Find ways to handle large amounts of β data without breaking the APIs @gamussa | @riferrei | #IMCSummit
10 Caches can be either Built-in Caches built-in or distributed Read API Cache Write Distributed Caches Cache Read API Cache Write Cache @gamussa | @riferrei | #IMCSummit
10 Caches can be either Built-in Caches built-in or distributed Read API Cache If data can fit into the API memory, then β Write you should use built-in caches Distributed Caches Cache Read API Cache Write Cache @gamussa | @riferrei | #IMCSummit
10 Caches can be either Built-in Caches built-in or distributed Read API Cache If data can fit into the API memory, then β Write you should use built-in caches Otherwise, you may need to use β distributed caches for large sizes Distributed Caches Cache Read API Cache Write Cache @gamussa | @riferrei | #IMCSummit
10 Caches can be either Built-in Caches built-in or distributed Read API Cache If data can fit into the API memory, then β Write you should use built-in caches Otherwise, you may need to use β distributed caches for large sizes Distributed Caches Cache Some cache implementations provides β Read API Cache the best of both cases Write Cache @gamussa | @riferrei | #IMCSummit
10 Caches can be either Built-in Caches built-in or distributed Read API Cache If data can fit into the API memory, then β Write you should use built-in caches Otherwise, you may need to use β distributed caches for large sizes Distributed Caches Cache Some cache implementations provides β Read API Cache the best of both cases Write For distributed caches, make sure to β Cache always find a good way to O(1) @gamussa | @riferrei | #IMCSummit
11 DEMO @gamussa | @riferrei | #IMCSummit
12 @gamussa | @riferrei | #IMCSummit
12 @gamussa | @riferrei | #IMCSummit
13 Join the fun ! @gamussa | @riferrei | #IMCSummit
14 @gamussa | @riferrei | #IMCSummit
15 Caching Patterns @gamussa | @riferrei | #IMCSummit
Caching Pattern: β¨ Cache API Refresh Ahead Proactively updates the cache β Kafka Kafka Connect Connect β Keep the entries always in-sync Ideal for latency sensitive cases β Ideal when data read is costly β β It may need initial data loading @gamussa | @riferrei | #IMCSummit
Transform and adapt records before delivery Caching Pattern: β¨ Application API Cache Refresh Ahead / Adapt β Proactively updates the cache Keep the entries always in-sync β Kafka Kafka Connect Connect Ideal for latency sensitive cases β β Ideal when data read is costly It may need initial data loading β Schema Registry for canonical models @gamussa | @riferrei | #IMCSummit
Caching Pattern: β¨ Application API Cache Write Behind β Removes I/O pressure from app Allows true horizontal scalability β Kafka Kafka Connect Connect Ensures ordering and β persistence Minimizes DB code complexity β β Totally handles DB unavailability @gamussa | @riferrei | #IMCSummit
Transform and adapt records before delivery Caching Pattern: β¨ Application API Cache Write Behind / Adapt β Removes I/O pressure from app Allows true horizontal scalability β Kafka Kafka Connect Connect Ensures ordering and β persistence Minimizes DB code complexity β β Totally handles DB unavailability Schema Registry for canonical models @gamussa | @riferrei | #IMCSummit
Caching Pattern: β¨ Event Federation β Replicates data across regions Keep multiple regions in-sync β Great to improve RPO and RTO β β Handles lazy/slow networks well Works well if its used along with β Confluent Replicator Read-Through and Write-Through <<MirrorMaker>> patterns. @gamussa | @riferrei | #IMCSummit
21 Kafka Connect Implementation Strategies @gamussa | @riferrei | #IMCSummit
Kafka Connect Kafka Connect support for In-Memory Caches Connector for Redis is open and it β Kafka Connect is available in Confluent Hub Connector for Memcached is open β and it is available in Confluent Hub Kafka Connect β Connectors for both GridGain and Apache Ignite implementations. Kafka Connect β Connector for InfiniSpan is open and is maintained by Red Hat @gamussa | @riferrei | #IMCSummit
Oracle Frameworks for other GoldenGate In-Memory Caches Oracle provides HotCache from β Hazelcast Jet GoldenGate for Oracle Coherence Hazelcast has the Jet framework, β which provides support for Kafka Spring Data Spring Kafka β Pivotal GemFire (Apache Geode) has good support from Spring Connect Any β Good news: you can always write Framework Cache your own sink using Connect API @gamussa | @riferrei | #IMCSummit
Interested on DB CDC? Then meet Debezium ! Amazing CDC technology to pull β data out from databases to Kafka Works in a log level, which means β true CDC implementation for your projects instead of record polling Open-source maintained by Red β Hat. Have broad support for many popular databases. It is built on top of Kafka Connect β @gamussa | @riferrei | #IMCSummit
Support for Running Kafka Connect Servers Run by yourself on BareMetal: β https://kafka.apache.org/downloads https:// Kafka www.confluent.io/download Connect β IaaS on AWS or Google Cloud: https://github.com/confluentinc/ccloud-tools β Running using Docker Containers: https://hub.docker.com/r/confluentinc/cp-kafka- connect/ Running using Kubernetes: https:// β github.com/confluentinc/cp-helm-chart https:// www.confluent.io/confluent-operator/ @gamussa | @riferrei | #IMCSummit
26 Stay in touch cnfl.io/blog cnfl.io/slack cnfl.io/meetups
Thanks ! @riferrei ricardo@confluent.io @gamussa viktor@confluent.io https://slackpass.io/confluentcommunity #connect #ksql @gamussa | @riferrei | #IMCSummit @
28
Recommend
More recommend