SlideShare uma empresa Scribd logo
1 de 68
Baixar para ler offline
@helenaedelson #kafkasummit 1
Leveraging Kafka for Big Data in Real Time Bidding,
Analytics, ML & Campaign Management
for Globally Distributed
Data Flows
Helena Edelson @helenaedelson Kafka Summit 2016
@helenaedelson #kafkasummit
VP of Engineering, Tuplejump
Previously: Sr Cloud / Big Data / Analytics
Engineer: DataStax, CrowdStrike, VMware,
SpringSource...
Event-Driven systems, Analytics, Machine
Learning, Scala
Committer: Kafka Connect Cassandra,
Spark Cassandra Connector
Contributor: Akka, previously: Spring
Integration
Speaker: Kafka Summit, Spark Summit, Strata,
QCon, Scala Days, Scala World, Philly ETE
2
twitter.com/helenaedelson
github.com/helena
slideshare.net/helenaedelson
@helenaedelson #kafkasummit
The Real Topic
3
http://www.slideshare.net/palvaro/ricon-keynote-outwards-from-the-middle-of-the-maze/42
@helenaedelson #kafkasummit
Chaos Of
Distribution
One of the more
fascinating problems is
that of solving the chaos
of distributed systems.
Regardless of the
domain.
4
@helenaedelson #kafkasummit
Aproaching this
within the use case of:
High-Level
Landscape
Platform &
Infrastructure
Strategies and Patterns
Four-Letter Acronyms
Can't Touch This
Architecture
5
@helenaedelson #kafkasummit 6
The Landscape
@helenaedelson #kafkasummit 7
The Digital Ad Industry
@helenaedelson #kafkasummit
An RTB Drive-By
Real time auction for ad
spaces, all devices
High throughput, low-Latency
(similar to FIN Tech but not
quite)
OpenRTB API Spec - but not
everyone uses it
8
Open protocol for
automated trading of
digital media across
platforms, devices, and
advertising solutions
@helenaedelson #kafkasummit 9
Ad
Delivered
to User
In A Nutshell
User
hits a
Publisher's
page
Advertiser
Advertiser
Advertisers
send Bid
Requests
Highest
Bid
Accepted
@helenaedelson #kafkasummit 10
Site:
Ad supported
content
Real Time Exchange &
Auction (SSP):
OpenRTB Server used to
bid
Bidder Service
(DSP):
OpenRTB client
Advertiser:Buyer
wants ad
impressions. Uses
bidders to bid on
behalf
Publisher:Seller
has ad spaces to
sell to highest
bidders
User Devices
ad
request
winning
ad
bid
request
win notice &
settlement price
insert orders
bid
response
winning
ad
RTB Auction for Impressions
@helenaedelson #kafkasummit 11
Time Is Money
RTB:
Maximum response latency of 100 ms
@helenaedelson #kafkasummit 12
Time Is Money
Assume some network latency!
@helenaedelson #kafkasummit
Sampling of RTB
Events
Ad Request
Bid Request - JSON 100 bytes
Compute optimal bid for advertiser
Bid Response - JSON 1000 bytes (may include ad metadata)
Win Notification (may or may not exist) with settlement price
Ad Impression - when the ad is viewed
Ad Click
Ad Conversion
13
@helenaedelson #kafkasummit
Event Streams
Auctions: auction data + bid requests
Ad Impressions: which ad ids were shown
Ad Clicks: which auction ids resulted in a
click
Ad Conversions: streams joined on auction id
Analytics Aggregations & ML to derive
hundreds of metrics and dimensions
14
@helenaedelson #kafkasummit 15
Real Time
Just means Event-Driven or processing events as they arrive.
Does not automatically equal sub-second latency
requirements.
Seen / Ingestion Time
When an event is ingested into the system
Event Time
When an event is created, e.g. on a device.
@helenaedelson #kafkasummit 16
The Platform
@helenaedelson #kafkasummit
Platform Requirements
24 / 7 Uptime
Brokerage model: DSPs only make $ on
successful ad deliveries, so uptime is critical
Security
Enable service across the globe
Handle thousands of concurrent requests per second
Scale to traffic of 700TB per day
Manage 700TB per day of data
Derive Metrics
17
@helenaedelson #kafkasummit
Business Requirements
Support SLAs for bid transactions
Legal constraints - user data crossing borders
The critical path must be fast to win
No data loss on ingestion path
Bid & Campaign Optimization
Frequency Capping
Management UI for Publishers & Advertisers
18
@helenaedelson #kafkasummit
Questions To Answer
% Writes on ingestion, analytics pre-aggregation, etc.
% Reads of raw data by analytics, aggregated views by customer
management UI
How much in memory on RTB app nodes?
Dimensions of data in analytics queries
Optimization Algos
What needs real time feedback loops, what does not
Which data flows are low-lateny/high frequency, which not
Where are potential bottlenecks
19
@helenaedelson #kafkasummit
Constraints
Resources - I need to build highly
functioning teams that are psyched
about the work and working together
Budget
Cloud Resources
JDK Version (What?!)
Existing infrastructure & technologies
that will be replaced later but you have to
deal with now :(
20
Pro Tip:
Pay well,
Allow people
to grow & be
creative
@helenaedelson #kafkasummit 21
Strategies
To Avoid
@helenaedelson #kafkasummit
Beware of the C word
Consistency?
22
Convergence?
@helenaedelson #kafkasummit 23
http://www.slideshare.net/palvaro/ricon-keynote-outwards-from-the-middle-of-the-maze/39
he went
there
@palvaro
@helenaedelson #kafkasummit
Complexity
24
Can't
Ops
your
way
out
of
that
@helenaedelson #kafkasummit 25
Occam's razor:
Simpler theories are preferable to more complex
@helenaedelson #kafkasummit 26
Strategies
@helenaedelson #kafkasummit
Approaches
Eventual/Tunable consistency
Time & Clocks in globally-distributed
systems
Location Transparency
Asynchrony
Pub-Sub
Design for scale
Design for Failure
27
@helenaedelson #kafkasummit
Kafka as Platform Fabric
28
@helenaedelson #kafkasummit
From MVP to Scalable with Kafka
Microservices
Does One Thing, Knows One Thing
Separate low-latency hot path
Separate deploy artifacts
Separate data mgmt clusters by
concern
analytics, timeseries, etc.
CQRS: Separate Read Write paths
29
Scalpel...
Separate The Monolith
@helenaedelson #kafkasummit
Immutable events stream to Kafka, partitioned
by event type, time, etc.
Subscribers & Publishers
RTB microservices - receives raw, receives
Analytics cluster - receives raw, publishes
aggregates
Management / Reporting nodes
30
Services communicate
indirectly via Kafka
@helenaedelson #kafkasummit
CQRS: Command Query
Responsibility Segregation
Decouple Write streams from Read streams
Different schemas / data structures
Writers (Publishers) publish without having
awareness who needs to receive it or how
to reach them (location, protocol...)
Readers (Subscribers) should be able to
subscribe and asynchronously receive
from topics of interest
31
@helenaedelson #kafkasummit 32
Eventually Consistent Across DCs
US-East-1
MirrorMaker
EU-west-1
RTB
micro
services
RTB
micro
services
RTB
micro
services
Publishers
Subscribers
Subscribers
Publishers
Kafka Cluster Per Region
ZK
ZK
Mgmt
micro
services
Mgmt
micro
services
Mgmt
micro
services
Query Layer
Analytics & ML Cluster
Timeseries Cluster
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Compute Layer
@helenaedelson #kafkasummit 33
MirrorMaker
RTB
micro
services
RTB
micro
services
RTB
micro
services
Publishers
Subscribers
Subscribers
Publishers
C*
C*
Eventually Consistent Across DCs
Mgmt
micro
services
Mgmt
micro
services
Mgmt
micro
services
US-East-1
EU-west-1
Kafka Cluster Per Region
Analytics & ML Cluster
Timeseries Cluster
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Compute Layer
Query Layer
@helenaedelson #kafkasummit
Kafka Cross Datacenter
Mirroring
bin/kafka-run-class.sh kafka.tools.MirrorMaker --consumer.config config/
consumer_source_cluster.properties --producer.config config/
producer_target_cluster.properties --whitelist bidrequests --num.producers 2 --
num.streams 4
34
Publish messages from various datacenters
around the world
@helenaedelson #kafkasummit
Users in the US and UK connect DCs in their geo region for
lower latency
Both DCs are part of the same cluster for X-DC Replication
Configure LB policies to prefer local DC
LOCAL_QUORUM reads
Data is available cluster-wide for backup, analytics, and to
account for user travel across regions
35
Cassandra Cross DC Replication
It's out of the box. Multi-region live backups for free:
[ NetworkTopologyStrategy ]
@helenaedelson #kafkasummit 36
Cassandra Cross DC Replication
Keep EU User Data in the EU
CREATE KEYSPACE rtb WITH REPLICATION = {
‘class’: ‘NetworkTopologyStrategy’,
‘eu-east-dc’: ‘3’,‘eu-west-dc’: ‘3’
};
@helenaedelson #kafkasummit 37
Cassandra Time Windowed Buckets with TTL
CREATE TABLE rtb.fu_events (
id int,
seen_time timeuuid,
event_time timestamp,
PRIMARY KEY (id,date)
) WITH CLUSTERING ORDER BY (event_time DESC)
AND compaction = {
'compaction_window_unit': 'DAY',
'compaction_window_size': '3',
'class':'com.jeffjirsa.cassandra.db.compaction.TimeWindowCompactionStrategy'
}
AND compression = {
'crc_check_chance': '0.5',
'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'
}
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"100"}'
AND dclocal_read_repair_chance = 0.0
AND default_time_to_live = 60
AND gc_grace_seconds = 0
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
3 DAY buckets -
larger SSTables on
disk minimizes
bootstrapping issues
when adding nodes
to a cluster
3 MINUTE buckets
1 HOUR buckets
1 DAY buckets
MICROSECOND resolution:
@helenaedelson #kafkasummit 38
Want Can Or Currently Use Status But
Kafka Security Kafka Security TLS, Kerberos, SASL, Auth,
Encryption, Authentication
v0.9.0
Thanks Jun!
Integrated Streaming Kafka Streams processing inside Kafka, no alternate
cluster setup or ops.
v0.10
Thanks Guozhang!
It's java :( Iw
Cassandra CDC Cassandra CDC.
Triggers? Tiggers are a pre-commit
hook :(
The Epic JIRA:
https://issues.apache.org/jira/browse/
CASSANDRA-8844
no comment
And... Kafka Streams &
Kafka Connect Integration
..wait for it..
no comment
Always on, X-DC
Replication, Flexible
Topologies
Kafka, Cassandra
OOTB
Fault Tolerance Kafka, Spark, Mesos, Cassandra,
Akka
Baked In
Location Transparency Kafka, Cassandra, Akka Check!
Asynchrony Kafka, Cassandra, Akka Check!
Decoupling Kafka, Akka Check!
Pub-Sub Kafka, Cassandra, Akka Check!
Immutability Kafka, Akka, Scala Check!
My Nerdy Chart v2.0
@helenaedelson #kafkasummit
Kafka Streams
in v 0.10
39
val builder = new KStreamBuilder()

val stream: KStream[K,V] = builder.stream(des, des, "raw.data.topic")
.flatMapValues(value -> Arrays.asList(value.toLowerCase.split(" ")
.map((k,v) -> new KeyValue(k,v))
.countByKey(ser, ser, des, des, "kTable")
.toStream
stream.to("results.topic", ...)
val streams = new KafkaStreams(builder, props)
streams.start()
@helenaedelson #kafkasummit
Kafka Streams &
Kafka Connect?
40
val builder = new KStreamBuilder()
val stream1: KStream[K,V] = builder.stream(new CassandraConnect(configs))
.flatMapValues(..)
.map((k,v) -> new KeyValue(k,v))
.countByKey(ser, ser, des, des, "kTable")
.toStream
stream.to("results.topic", ...)
val streams = new KafkaStreams(builder, props)
streams.start()
YES
@helenaedelson #kafkasummit 41
/** Writes records from Kafka to Cassandra asynchronously and non-blocking. */
override def put(records: JCollection[SinkRecord]): Unit
/** Returns a list of records when available by polling for new records. */
override def poll: JList[SourceRecord])
https://github.com/tuplejump/kafka-connect-cassandra
@helenaedelson #kafkasummit
Frequency Capping
1. Count the number of times user X has seen ad Y from
Advertiser A's Campaign C
2. Limit the max number of impressions of an ad within
T1...T2
42
Use Case:
Continuously count impressions grouped by campaign across DCs
low-latency reads & writes
Must scale
Cross DC Counters
Translation: Distributed Counters
@helenaedelson #kafkasummit
Redis? Broke under the load
Aerospike? Great candidate
Eventuate? Interesting, much lighter
Kafka streams when it's out? Interesting, already in the
infra
Flink? Very interesting but...
Cassandra Counters - not applicable for this
43
Frequency Capping
@helenaedelson #kafkasummit
As a distributed counting microservice
As a key-value store for in-memory caching
Fast reads - Very read heavy
99% reads are < 1 ms latency (sweet)
30,000 writes per second
350,000 reads per second on 7 nodes
Replication factor 2:
Cross datacenter replication (XDC), SSD-backed
Excellent few posts by Dag, Tapads CTO on in-memory
infrastructure + Ad Tech: (see resources slide)
44
Aerospike
@helenaedelson #kafkasummit
CRDT: Conflict Free
Replicated Data Type
State-based: objects require only eventual communication
between pairs of replicas
Operation-based: replication requires reliable broadcast
communication with delivery in a well-defined delivery
order
Both guaranteed to converge towards common, correct state
Keep replicas available for writes during a network partition
requires resolution of conflicting writes when the partition
heals
45
@helenaedelson #kafkasummit
Eventuate
A toolkit for building distributed, HA & partition-tolerant event-sourced applications.
Developed by Martin Krasser (@mrt1nz) for Red Bull Media (open source)
Interactive, automated conflict resolution (via op-based CRDTs)
Separates command side of an app from its query side (CQRS)
Primary Goals: preserving causality, idempotency & event ordering guarantees even under
chaotic conditions
AP of CAP - conflicts cannot be prevented & must be resolved.
Causality - tracked with Vector Clocks
Adapters provide connectivity to other stream processing solutions
Can currently chose Cassandra if desired
Kafka coming soon!
46
@helenaedelson #kafkasummit
Replication of application state through
async event replication across locations
Locations consume replicated events to re-
construct application state locally
Multiple locations concurrently update as
multi-master
47
Eventuate as
Distributed CRDT Microservice
@helenaedelson #kafkasummit 48
Applications can continue
writing to a local replica during
a network partition
-> To Cassandra
-> To Kafka
(soon)
Pass To Pipeline:
@helenaedelson #kafkasummit 49
import scala.concurrent.Future

import akka.actor.{ActorRef, ActorSystem}

import com.rbmhtechnology.eventuate.crdt.{CRDTServiceOps, Counter, CounterService}
class CappingService(val id: String, override val log: ActorRef)

(implicit val system: ActorSystem,

val integral: Integral[Int],

override val ops: CRDTServiceOps[Counter[Int], Int])

extends CounterService[Int](id, log) {



/** Increment only op: adds `delta` to the counter identified by `id`
* and returns the updated counter value.
*/

def increment(id: String, delta: Int): Future[Int] =

value(id) flatMap {

case v if v >= 0 && (delta > 0 || delta > v) =>

update(id, delta)

case v =>

Future.successful(v)

}



start()



}
import scala.concurrent.Future
import akka.actor.ActorSystem
val a = new CappingService(id1, eventLog)

a.increment(id1, 3) // Future(3) 3 impressions

a.value(id1) // Future(3) 3 impressions

a.increment(id1, -2) // increments only, idempotent.
val b = new CappingService(id2, eventLog)
b.value(id1) // Future(a.value(id1))
Knows the same count over n-instances,
all geo-locations, for the same id
class CounterService[A : Integral](val replicaId: String, val log: ActorRef) {
def value(id: String): Future[A] = { ... }
def update(id: String, delta: A): Future[A] = { ... }
}
@helenaedelson #kafkasummit 50
Eventuate
@helenaedelson #kafkasummit
Eventuate Takeaway
It's just a jar!
OOTB async internal component messaging
and fault tolerance
Integrate with relevant microservices
No store/cache cluster to deploy, just keep
monitoring your apps
Written in Scala
Built on Akka - a toolkit for building highly
concurrent, distributed, and resilient event-
driven applications on the JVM
51
@helenaedelson #kafkasummit 52
Analytics & ML
@helenaedelson #kafkasummit
Refresher: Sampling of
RTB Events
Ad Request
Bid Request - JSON 100 bytes
Compute optimal bid for advertiser
Bid Response - JSON 1000 bytes (may include ad metadata)
Win Notification (may or may not exist) with settlement price
Ad Impression - when the ad is viewed
Ad Click
Ad Conversion
53
@helenaedelson #kafkasummit 54
OpenRTB: objects in the Bid Request model
@helenaedelson #kafkasummit
TopK most high performing
campaigns
Number of views served in the last 7
days, by country, by city
What determined successful ad
conversions
Age distribution per campaign
55
Streaming Analytics
@helenaedelson #kafkasummit
Spark Streaming Kafka
class KafkaStreamingActor(ssc: StreamingContext) extends MyAggregationActor {
val stream = KafkaUtils.createDirectStream(...).map(RawData(_))
stream
.foreachRDD(_.toDF.write.format("filodb.spark")
.option("dataset", "rawdata")
.save())

/* Pre-Aggregate data in the stream for fast querying and aggregation later
stream.map(hour =>

(hour.wsid, hour.year, hour.month, hour.day, hour.oneHourPrecip)
).saveToCassandra(timeseriesKeyspace, dailyPrecipTable)
}
56
Can write to
Cassandra,
FiloDB...
@helenaedelson #kafkasummit
Machine Learning
Train on 1+ week of data for
Recommendations
Bid Optimization
Campaign Optimization
Consumer Profiling
...and much more
57
@helenaedelson #kafkasummit
Machine Learning
The probability of an ad, from a specific
ISP, OS, website, demographic, etc.
resulting in a conversion
Which attributes of impressions are good
predictors of better ad performance?
58
@helenaedelson #kafkasummit
Bid Optimization &
Predictive Models
Which impressions should an Advertiser bid for?
Per campaign, per country it may run in..?
What is the best bid for each impression
59
@helenaedelson #kafkasummit 60
Compute
optimal bid
price
Train the
model
Score
bid requests
Determine
value of
bid reqest
Train on every
bid req attribute
Based on Campaign
Objectives
Against Budget Send bid decision
to bidder
Machine Learning
@helenaedelson #kafkasummit
Spark Streaming, MLLib & FiloDB
61
val ssc = new StreamingContext(sparkConf, Seconds(5))

val kafkaStream = KafkaUtils.createDirectStream[..](..)
.map(transformFunc)
.map(LabeledPoint.parse)
kafkaStream.foreachRDD(_.toDF.write.format("filodb.spark")
.option("dataset", "training").save())


val model = new StreamingLinearRegressionWithSGD()

.setInitialWeights(Vectors.dense(weights))
.trainOn(dataStream.join(historicalEvents))
model.predictOnValues(dataStream.map(lp => (lp.label, lp.features)))
.insertIntoFilo("predictions")
@helenaedelson #kafkasummit
700 Queries Per Second:
Spark Streaming & FiloDB
Even for datasets with 15 million rows! Using FiloDB's
InMemoryColumnStore
Single host / MBP
5GB RAM
SQL to DataFrame caching
https://github.com/tuplejump/FiloDB
Evan Chan's (@velvia) blog post
NoLambda: A new architecture combining streaming, ad hoc,
machine-learning, and batch analytics
62
@helenaedelson #kafkasummit 63
Eventually Consistent Across DCs
US-East-1
MirrorMaker
EU-west-1
RTB
micro
services
RTB
micro
services
RTB
micro
services
Publishers
Subscribers
Subscribers
Publishers
Kafka Cluster Per Region
ZK
ZK
Mgmt
micro
services
Mgmt
micro
services
Mgmt
micro
services
Query Layer
Analytics & ML Cluster
Timeseries Cluster
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Spark
Streaming
& ML
Cassandra
Cross DC
Replication
Topology
Aware
Spark
Streaming
& ML
Cassandra
Compute Layer
@helenaedelson #kafkasummit
Self-Healing Systems
Massive event spikes & bursty traffic
Fast producers / slow consumers
Network partitioning & out of sync
systems
DC down
Not DDOS'ing ourselves from fast
streams No data loss when auto-
scaling down
64
@helenaedelson #kafkasummit
Byzantine Fault Tolerance?
65
Looks like I'll
miss standup
@helenaedelson #kafkasummit
Everything fails, all the time
Monitor
Everything
66
@helenaedelson #kafkasummit
Non-Monotonic Snapshot Isolation: scalable and strong consistency
for geo-replicated transactional systems
Conflict-free Replicated Data Types
Implementing operation-based CRDTs
http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh
http://martinfowler.com/bliki/CQRS.html
http://github.com/openrtb/OpenRTB
http://akka.io
http://rbmhtechnology.github.io/eventuate
https://github.com/RBMHTechnology/eventuate
http://rbmhtechnology.github.io/eventuate/user-guide.html#commutative-replicated-data-types
http://www.planetcassandra.org/data-replication-in-nosql-databases-explained
http://wikibon.org/wiki/v/Optimizing_Infrastructure_for_Analytics-Driven_Real-Time_Decision_Making
Resources
67
twitter.com/helenaedelson
github.com/helena
slideshare.net/helenaedelson
Thanks!
@helenaedelson #kafkasummit

Mais conteúdo relacionado

Mais procurados

Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Amazon Web Services
 
Distributed stream processing with Apache Kafka
Distributed stream processing with Apache KafkaDistributed stream processing with Apache Kafka
Distributed stream processing with Apache Kafkaconfluent
 
DevOps Maturity Curve v5
DevOps Maturity Curve v5DevOps Maturity Curve v5
DevOps Maturity Curve v5Paul Peissner
 
Gestion des demandes avec JIRA
Gestion des demandes avec JIRAGestion des demandes avec JIRA
Gestion des demandes avec JIRATechSolCom
 
Multi-Tenancy with Spring Boot
Multi-Tenancy with Spring Boot Multi-Tenancy with Spring Boot
Multi-Tenancy with Spring Boot Stormpath
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanAraf Karsh Hamid
 
Run IT Support the DevOps Way
Run IT Support the DevOps WayRun IT Support the DevOps Way
Run IT Support the DevOps WayAtlassian
 
Metrics Worth Measuring: Align Business Goals to Salesforce Adoption
Metrics Worth Measuring: Align Business Goals to Salesforce AdoptionMetrics Worth Measuring: Align Business Goals to Salesforce Adoption
Metrics Worth Measuring: Align Business Goals to Salesforce AdoptionSalesforce Admins
 
How to Execute a Successful API Strategy
How to Execute a Successful API StrategyHow to Execute a Successful API Strategy
How to Execute a Successful API StrategyMatt McLarty
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushLucas Jellema
 
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...confluent
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architectureThe Software House
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...Cprime
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafkaconfluent
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureLourens Naudé
 

Mais procurados (20)

Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
 
Distributed stream processing with Apache Kafka
Distributed stream processing with Apache KafkaDistributed stream processing with Apache Kafka
Distributed stream processing with Apache Kafka
 
DevOps Maturity Curve v5
DevOps Maturity Curve v5DevOps Maturity Curve v5
DevOps Maturity Curve v5
 
Gestion des demandes avec JIRA
Gestion des demandes avec JIRAGestion des demandes avec JIRA
Gestion des demandes avec JIRA
 
Multi-Tenancy with Spring Boot
Multi-Tenancy with Spring Boot Multi-Tenancy with Spring Boot
Multi-Tenancy with Spring Boot
 
Olist Architecture v2.0
Olist Architecture v2.0Olist Architecture v2.0
Olist Architecture v2.0
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
 
Definitive Guide to API Management
Definitive Guide to API ManagementDefinitive Guide to API Management
Definitive Guide to API Management
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Run IT Support the DevOps Way
Run IT Support the DevOps WayRun IT Support the DevOps Way
Run IT Support the DevOps Way
 
Metrics Worth Measuring: Align Business Goals to Salesforce Adoption
Metrics Worth Measuring: Align Business Goals to Salesforce AdoptionMetrics Worth Measuring: Align Business Goals to Salesforce Adoption
Metrics Worth Measuring: Align Business Goals to Salesforce Adoption
 
How to Execute a Successful API Strategy
How to Execute a Successful API StrategyHow to Execute a Successful API Strategy
How to Execute a Successful API Strategy
 
DevOps and Cloud
DevOps and CloudDevOps and Cloud
DevOps and Cloud
 
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server PushReal Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
Real Time UI with Apache Kafka Streaming Analytics of Fast Data and Server Push
 
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
Everything You Always Wanted to Know About Kafka’s Rebalance Protocol but Wer...
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...
Lean Portfolio Strategy Part 2: Shifting from Imitation to Real LPM - The Mov...
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafka
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 

Destaque

Disorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At ScaleDisorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At ScaleHelena Edelson
 
Streaming Big Data & Analytics For Scale
Streaming Big Data & Analytics For ScaleStreaming Big Data & Analytics For Scale
Streaming Big Data & Analytics For ScaleHelena Edelson
 
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...Helena Edelson
 
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisNoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisHelena Edelson
 
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...Idiro Analytics - Identifying Families using Social Network Analysis and Big ...
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...Idiro Analytics
 
Big Telco - Yousun Jeong
Big Telco - Yousun JeongBig Telco - Yousun Jeong
Big Telco - Yousun JeongSpark Summit
 
Deriving economic value for CSPs with Big Data [read-only]
Deriving economic value for CSPs with Big Data [read-only]Deriving economic value for CSPs with Big Data [read-only]
Deriving economic value for CSPs with Big Data [read-only]Flytxt
 
Idiro Analytics - Analytics & Big Data
Idiro Analytics - Analytics & Big DataIdiro Analytics - Analytics & Big Data
Idiro Analytics - Analytics & Big DataIdiro Analytics
 
Telco Churn Roi V3
Telco Churn Roi V3Telco Churn Roi V3
Telco Churn Roi V3hkaul
 
Idiro Analytics - What is Rotational Churn and how can we tackle it?
Idiro Analytics - What is Rotational Churn and how can we tackle it?Idiro Analytics - What is Rotational Churn and how can we tackle it?
Idiro Analytics - What is Rotational Churn and how can we tackle it?Idiro Analytics
 
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...BAINIDA
 
Idiro Analytics - Social Network Analysis for Online Gaming
Idiro Analytics - Social Network Analysis for Online GamingIdiro Analytics - Social Network Analysis for Online Gaming
Idiro Analytics - Social Network Analysis for Online GamingIdiro Analytics
 
Churn Analysis in Telecom Industry
Churn Analysis in Telecom IndustryChurn Analysis in Telecom Industry
Churn Analysis in Telecom IndustrySatyam Barsaiyan
 
Social Network Analysis for Telecoms
Social Network Analysis for TelecomsSocial Network Analysis for Telecoms
Social Network Analysis for TelecomsDataspora
 
Predicting churn in telco industry: machine learning approach - Marko Mitić
 Predicting churn in telco industry: machine learning approach - Marko Mitić Predicting churn in telco industry: machine learning approach - Marko Mitić
Predicting churn in telco industry: machine learning approach - Marko MitićInstitute of Contemporary Sciences
 
Decide on technology stack & data architecture
Decide on technology stack & data architectureDecide on technology stack & data architecture
Decide on technology stack & data architectureSV.CO
 
How to use your CRM for upselling and cross-selling
How to use your CRM for upselling and cross-sellingHow to use your CRM for upselling and cross-selling
How to use your CRM for upselling and cross-sellingRedspire Ltd
 
Big Data: Social Network Analysis
Big Data: Social Network AnalysisBig Data: Social Network Analysis
Big Data: Social Network AnalysisMichel Bruley
 
Big Data Analytics : A Social Network Approach
Big Data Analytics : A Social Network ApproachBig Data Analytics : A Social Network Approach
Big Data Analytics : A Social Network ApproachAndry Alamsyah
 

Destaque (20)

Disorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At ScaleDisorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At Scale
 
Streaming Big Data & Analytics For Scale
Streaming Big Data & Analytics For ScaleStreaming Big Data & Analytics For Scale
Streaming Big Data & Analytics For Scale
 
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...
Building Reactive Distributed Systems For Streaming Big Data, Analytics & Mac...
 
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisNoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
 
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...Idiro Analytics - Identifying Families using Social Network Analysis and Big ...
Idiro Analytics - Identifying Families using Social Network Analysis and Big ...
 
Big Telco - Yousun Jeong
Big Telco - Yousun JeongBig Telco - Yousun Jeong
Big Telco - Yousun Jeong
 
Deriving economic value for CSPs with Big Data [read-only]
Deriving economic value for CSPs with Big Data [read-only]Deriving economic value for CSPs with Big Data [read-only]
Deriving economic value for CSPs with Big Data [read-only]
 
Idiro Analytics - Analytics & Big Data
Idiro Analytics - Analytics & Big DataIdiro Analytics - Analytics & Big Data
Idiro Analytics - Analytics & Big Data
 
Telco Churn Roi V3
Telco Churn Roi V3Telco Churn Roi V3
Telco Churn Roi V3
 
Idiro Analytics - What is Rotational Churn and how can we tackle it?
Idiro Analytics - What is Rotational Churn and how can we tackle it?Idiro Analytics - What is Rotational Churn and how can we tackle it?
Idiro Analytics - What is Rotational Churn and how can we tackle it?
 
Churn modelling
Churn modellingChurn modelling
Churn modelling
 
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...
Subscriber Churn Prediction Model using Social Network Analysis In Telecommun...
 
Idiro Analytics - Social Network Analysis for Online Gaming
Idiro Analytics - Social Network Analysis for Online GamingIdiro Analytics - Social Network Analysis for Online Gaming
Idiro Analytics - Social Network Analysis for Online Gaming
 
Churn Analysis in Telecom Industry
Churn Analysis in Telecom IndustryChurn Analysis in Telecom Industry
Churn Analysis in Telecom Industry
 
Social Network Analysis for Telecoms
Social Network Analysis for TelecomsSocial Network Analysis for Telecoms
Social Network Analysis for Telecoms
 
Predicting churn in telco industry: machine learning approach - Marko Mitić
 Predicting churn in telco industry: machine learning approach - Marko Mitić Predicting churn in telco industry: machine learning approach - Marko Mitić
Predicting churn in telco industry: machine learning approach - Marko Mitić
 
Decide on technology stack & data architecture
Decide on technology stack & data architectureDecide on technology stack & data architecture
Decide on technology stack & data architecture
 
How to use your CRM for upselling and cross-selling
How to use your CRM for upselling and cross-sellingHow to use your CRM for upselling and cross-selling
How to use your CRM for upselling and cross-selling
 
Big Data: Social Network Analysis
Big Data: Social Network AnalysisBig Data: Social Network Analysis
Big Data: Social Network Analysis
 
Big Data Analytics : A Social Network Approach
Big Data Analytics : A Social Network ApproachBig Data Analytics : A Social Network Approach
Big Data Analytics : A Social Network Approach
 

Semelhante a Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign Management for Globally Distributed Data Flows

Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...confluent
 
Rethinking Streaming Analytics For Scale
Rethinking Streaming Analytics For ScaleRethinking Streaming Analytics For Scale
Rethinking Streaming Analytics For ScaleHelena Edelson
 
Keynote Roberto Delamora - AWS Cloud Experience Argentina
Keynote Roberto Delamora - AWS Cloud Experience ArgentinaKeynote Roberto Delamora - AWS Cloud Experience Argentina
Keynote Roberto Delamora - AWS Cloud Experience ArgentinaAmazon Web Services LATAM
 
Data Analytics at Altocloud
Data Analytics at Altocloud Data Analytics at Altocloud
Data Analytics at Altocloud Altocloud
 
Leveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern AnalyticsLeveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern Analyticsconfluent
 
Orchestrate data with agility and responsiveness. Learn how to manage a commo...
Orchestrate data with agility and responsiveness. Learn how to manage a commo...Orchestrate data with agility and responsiveness. Learn how to manage a commo...
Orchestrate data with agility and responsiveness. Learn how to manage a commo...Skender Kollcaku
 
Cloud Native London 2019 Faas composition using Kafka and cloud-events
Cloud Native London 2019 Faas composition using Kafka and cloud-eventsCloud Native London 2019 Faas composition using Kafka and cloud-events
Cloud Native London 2019 Faas composition using Kafka and cloud-eventsNeil Avery
 
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...Timothy Spann
 
Orchestration Ownage - RSAC 2017
Orchestration Ownage - RSAC 2017Orchestration Ownage - RSAC 2017
Orchestration Ownage - RSAC 2017Bryce Kunz
 
Rethinking Streaming Analytics for Scale
Rethinking Streaming Analytics for ScaleRethinking Streaming Analytics for Scale
Rethinking Streaming Analytics for ScaleC4Media
 
Shared time-series-analysis-using-an-event-streaming-platform -_v2
Shared   time-series-analysis-using-an-event-streaming-platform -_v2Shared   time-series-analysis-using-an-event-streaming-platform -_v2
Shared time-series-analysis-using-an-event-streaming-platform -_v2confluent
 
Time series-analysis-using-an-event-streaming-platform -_v3_final
Time series-analysis-using-an-event-streaming-platform -_v3_finalTime series-analysis-using-an-event-streaming-platform -_v3_final
Time series-analysis-using-an-event-streaming-platform -_v3_finalconfluent
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Re-engineering Engineering: from a cathedral to a bazaar?
Re-engineering Engineering: from a cathedral to a bazaar?Re-engineering Engineering: from a cathedral to a bazaar?
Re-engineering Engineering: from a cathedral to a bazaar?Open Networking Summits
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena Edelson
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena EdelsonStreaming Analytics with Spark, Kafka, Cassandra and Akka by Helena Edelson
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena EdelsonSpark Summit
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionTimothy Spann
 
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...Flink Forward
 
Apache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshConfluentInc1
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaStreaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaHelena Edelson
 
Serverless integration anatomy
Serverless integration anatomyServerless integration anatomy
Serverless integration anatomyChristina Lin
 

Semelhante a Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign Management for Globally Distributed Data Flows (20)

Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
 
Rethinking Streaming Analytics For Scale
Rethinking Streaming Analytics For ScaleRethinking Streaming Analytics For Scale
Rethinking Streaming Analytics For Scale
 
Keynote Roberto Delamora - AWS Cloud Experience Argentina
Keynote Roberto Delamora - AWS Cloud Experience ArgentinaKeynote Roberto Delamora - AWS Cloud Experience Argentina
Keynote Roberto Delamora - AWS Cloud Experience Argentina
 
Data Analytics at Altocloud
Data Analytics at Altocloud Data Analytics at Altocloud
Data Analytics at Altocloud
 
Leveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern AnalyticsLeveraging Mainframe Data for Modern Analytics
Leveraging Mainframe Data for Modern Analytics
 
Orchestrate data with agility and responsiveness. Learn how to manage a commo...
Orchestrate data with agility and responsiveness. Learn how to manage a commo...Orchestrate data with agility and responsiveness. Learn how to manage a commo...
Orchestrate data with agility and responsiveness. Learn how to manage a commo...
 
Cloud Native London 2019 Faas composition using Kafka and cloud-events
Cloud Native London 2019 Faas composition using Kafka and cloud-eventsCloud Native London 2019 Faas composition using Kafka and cloud-events
Cloud Native London 2019 Faas composition using Kafka and cloud-events
 
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...
2024 February 28 - NYC - Meetup Unlocking Financial Data with Real-Time Pipel...
 
Orchestration Ownage - RSAC 2017
Orchestration Ownage - RSAC 2017Orchestration Ownage - RSAC 2017
Orchestration Ownage - RSAC 2017
 
Rethinking Streaming Analytics for Scale
Rethinking Streaming Analytics for ScaleRethinking Streaming Analytics for Scale
Rethinking Streaming Analytics for Scale
 
Shared time-series-analysis-using-an-event-streaming-platform -_v2
Shared   time-series-analysis-using-an-event-streaming-platform -_v2Shared   time-series-analysis-using-an-event-streaming-platform -_v2
Shared time-series-analysis-using-an-event-streaming-platform -_v2
 
Time series-analysis-using-an-event-streaming-platform -_v3_final
Time series-analysis-using-an-event-streaming-platform -_v3_finalTime series-analysis-using-an-event-streaming-platform -_v3_final
Time series-analysis-using-an-event-streaming-platform -_v3_final
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Re-engineering Engineering: from a cathedral to a bazaar?
Re-engineering Engineering: from a cathedral to a bazaar?Re-engineering Engineering: from a cathedral to a bazaar?
Re-engineering Engineering: from a cathedral to a bazaar?
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena Edelson
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena EdelsonStreaming Analytics with Spark, Kafka, Cassandra and Akka by Helena Edelson
Streaming Analytics with Spark, Kafka, Cassandra and Akka by Helena Edelson
 
PartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC SolutionPartnerSkillUp_Enable a Streaming CDC Solution
PartnerSkillUp_Enable a Streaming CDC Solution
 
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
FlinkDTW: Time-series Pattern Search at Scale Using Dynamic Time Warping - Ch...
 
Apache Kafka® and the Data Mesh
Apache Kafka® and the Data MeshApache Kafka® and the Data Mesh
Apache Kafka® and the Data Mesh
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and AkkaStreaming Analytics with Spark, Kafka, Cassandra and Akka
Streaming Analytics with Spark, Kafka, Cassandra and Akka
 
Serverless integration anatomy
Serverless integration anatomyServerless integration anatomy
Serverless integration anatomy
 

Mais de Helena Edelson

Toward Predictability and Stability
Toward Predictability and StabilityToward Predictability and Stability
Toward Predictability and StabilityHelena Edelson
 
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...Helena Edelson
 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaHelena Edelson
 
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...Helena Edelson
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Helena Edelson
 
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Helena Edelson
 

Mais de Helena Edelson (7)

Toward Predictability and Stability
Toward Predictability and StabilityToward Predictability and Stability
Toward Predictability and Stability
 
Patterns In The Chaos
Patterns In The ChaosPatterns In The Chaos
Patterns In The Chaos
 
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
 
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...
Lambda Architecture with Spark, Spark Streaming, Kafka, Cassandra, Akka and S...
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
 
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign Management for Globally Distributed Data Flows

  • 1. @helenaedelson #kafkasummit 1 Leveraging Kafka for Big Data in Real Time Bidding, Analytics, ML & Campaign Management for Globally Distributed Data Flows Helena Edelson @helenaedelson Kafka Summit 2016
  • 2. @helenaedelson #kafkasummit VP of Engineering, Tuplejump Previously: Sr Cloud / Big Data / Analytics Engineer: DataStax, CrowdStrike, VMware, SpringSource... Event-Driven systems, Analytics, Machine Learning, Scala Committer: Kafka Connect Cassandra, Spark Cassandra Connector Contributor: Akka, previously: Spring Integration Speaker: Kafka Summit, Spark Summit, Strata, QCon, Scala Days, Scala World, Philly ETE 2 twitter.com/helenaedelson github.com/helena slideshare.net/helenaedelson
  • 3. @helenaedelson #kafkasummit The Real Topic 3 http://www.slideshare.net/palvaro/ricon-keynote-outwards-from-the-middle-of-the-maze/42
  • 4. @helenaedelson #kafkasummit Chaos Of Distribution One of the more fascinating problems is that of solving the chaos of distributed systems. Regardless of the domain. 4
  • 5. @helenaedelson #kafkasummit Aproaching this within the use case of: High-Level Landscape Platform & Infrastructure Strategies and Patterns Four-Letter Acronyms Can't Touch This Architecture 5
  • 7. @helenaedelson #kafkasummit 7 The Digital Ad Industry
  • 8. @helenaedelson #kafkasummit An RTB Drive-By Real time auction for ad spaces, all devices High throughput, low-Latency (similar to FIN Tech but not quite) OpenRTB API Spec - but not everyone uses it 8 Open protocol for automated trading of digital media across platforms, devices, and advertising solutions
  • 9. @helenaedelson #kafkasummit 9 Ad Delivered to User In A Nutshell User hits a Publisher's page Advertiser Advertiser Advertisers send Bid Requests Highest Bid Accepted
  • 10. @helenaedelson #kafkasummit 10 Site: Ad supported content Real Time Exchange & Auction (SSP): OpenRTB Server used to bid Bidder Service (DSP): OpenRTB client Advertiser:Buyer wants ad impressions. Uses bidders to bid on behalf Publisher:Seller has ad spaces to sell to highest bidders User Devices ad request winning ad bid request win notice & settlement price insert orders bid response winning ad RTB Auction for Impressions
  • 11. @helenaedelson #kafkasummit 11 Time Is Money RTB: Maximum response latency of 100 ms
  • 12. @helenaedelson #kafkasummit 12 Time Is Money Assume some network latency!
  • 13. @helenaedelson #kafkasummit Sampling of RTB Events Ad Request Bid Request - JSON 100 bytes Compute optimal bid for advertiser Bid Response - JSON 1000 bytes (may include ad metadata) Win Notification (may or may not exist) with settlement price Ad Impression - when the ad is viewed Ad Click Ad Conversion 13
  • 14. @helenaedelson #kafkasummit Event Streams Auctions: auction data + bid requests Ad Impressions: which ad ids were shown Ad Clicks: which auction ids resulted in a click Ad Conversions: streams joined on auction id Analytics Aggregations & ML to derive hundreds of metrics and dimensions 14
  • 15. @helenaedelson #kafkasummit 15 Real Time Just means Event-Driven or processing events as they arrive. Does not automatically equal sub-second latency requirements. Seen / Ingestion Time When an event is ingested into the system Event Time When an event is created, e.g. on a device.
  • 17. @helenaedelson #kafkasummit Platform Requirements 24 / 7 Uptime Brokerage model: DSPs only make $ on successful ad deliveries, so uptime is critical Security Enable service across the globe Handle thousands of concurrent requests per second Scale to traffic of 700TB per day Manage 700TB per day of data Derive Metrics 17
  • 18. @helenaedelson #kafkasummit Business Requirements Support SLAs for bid transactions Legal constraints - user data crossing borders The critical path must be fast to win No data loss on ingestion path Bid & Campaign Optimization Frequency Capping Management UI for Publishers & Advertisers 18
  • 19. @helenaedelson #kafkasummit Questions To Answer % Writes on ingestion, analytics pre-aggregation, etc. % Reads of raw data by analytics, aggregated views by customer management UI How much in memory on RTB app nodes? Dimensions of data in analytics queries Optimization Algos What needs real time feedback loops, what does not Which data flows are low-lateny/high frequency, which not Where are potential bottlenecks 19
  • 20. @helenaedelson #kafkasummit Constraints Resources - I need to build highly functioning teams that are psyched about the work and working together Budget Cloud Resources JDK Version (What?!) Existing infrastructure & technologies that will be replaced later but you have to deal with now :( 20 Pro Tip: Pay well, Allow people to grow & be creative
  • 22. @helenaedelson #kafkasummit Beware of the C word Consistency? 22 Convergence?
  • 25. @helenaedelson #kafkasummit 25 Occam's razor: Simpler theories are preferable to more complex
  • 27. @helenaedelson #kafkasummit Approaches Eventual/Tunable consistency Time & Clocks in globally-distributed systems Location Transparency Asynchrony Pub-Sub Design for scale Design for Failure 27
  • 29. @helenaedelson #kafkasummit From MVP to Scalable with Kafka Microservices Does One Thing, Knows One Thing Separate low-latency hot path Separate deploy artifacts Separate data mgmt clusters by concern analytics, timeseries, etc. CQRS: Separate Read Write paths 29 Scalpel... Separate The Monolith
  • 30. @helenaedelson #kafkasummit Immutable events stream to Kafka, partitioned by event type, time, etc. Subscribers & Publishers RTB microservices - receives raw, receives Analytics cluster - receives raw, publishes aggregates Management / Reporting nodes 30 Services communicate indirectly via Kafka
  • 31. @helenaedelson #kafkasummit CQRS: Command Query Responsibility Segregation Decouple Write streams from Read streams Different schemas / data structures Writers (Publishers) publish without having awareness who needs to receive it or how to reach them (location, protocol...) Readers (Subscribers) should be able to subscribe and asynchronously receive from topics of interest 31
  • 32. @helenaedelson #kafkasummit 32 Eventually Consistent Across DCs US-East-1 MirrorMaker EU-west-1 RTB micro services RTB micro services RTB micro services Publishers Subscribers Subscribers Publishers Kafka Cluster Per Region ZK ZK Mgmt micro services Mgmt micro services Mgmt micro services Query Layer Analytics & ML Cluster Timeseries Cluster Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Compute Layer
  • 33. @helenaedelson #kafkasummit 33 MirrorMaker RTB micro services RTB micro services RTB micro services Publishers Subscribers Subscribers Publishers C* C* Eventually Consistent Across DCs Mgmt micro services Mgmt micro services Mgmt micro services US-East-1 EU-west-1 Kafka Cluster Per Region Analytics & ML Cluster Timeseries Cluster Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Compute Layer Query Layer
  • 34. @helenaedelson #kafkasummit Kafka Cross Datacenter Mirroring bin/kafka-run-class.sh kafka.tools.MirrorMaker --consumer.config config/ consumer_source_cluster.properties --producer.config config/ producer_target_cluster.properties --whitelist bidrequests --num.producers 2 -- num.streams 4 34 Publish messages from various datacenters around the world
  • 35. @helenaedelson #kafkasummit Users in the US and UK connect DCs in their geo region for lower latency Both DCs are part of the same cluster for X-DC Replication Configure LB policies to prefer local DC LOCAL_QUORUM reads Data is available cluster-wide for backup, analytics, and to account for user travel across regions 35 Cassandra Cross DC Replication It's out of the box. Multi-region live backups for free: [ NetworkTopologyStrategy ]
  • 36. @helenaedelson #kafkasummit 36 Cassandra Cross DC Replication Keep EU User Data in the EU CREATE KEYSPACE rtb WITH REPLICATION = { ‘class’: ‘NetworkTopologyStrategy’, ‘eu-east-dc’: ‘3’,‘eu-west-dc’: ‘3’ };
  • 37. @helenaedelson #kafkasummit 37 Cassandra Time Windowed Buckets with TTL CREATE TABLE rtb.fu_events ( id int, seen_time timeuuid, event_time timestamp, PRIMARY KEY (id,date) ) WITH CLUSTERING ORDER BY (event_time DESC) AND compaction = { 'compaction_window_unit': 'DAY', 'compaction_window_size': '3', 'class':'com.jeffjirsa.cassandra.db.compaction.TimeWindowCompactionStrategy' } AND compression = { 'crc_check_chance': '0.5', 'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor' } AND bloom_filter_fp_chance = 0.01 AND caching = '{"keys":"ALL", "rows_per_partition":"100"}' AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 60 AND gc_grace_seconds = 0 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99.0PERCENTILE'; 3 DAY buckets - larger SSTables on disk minimizes bootstrapping issues when adding nodes to a cluster 3 MINUTE buckets 1 HOUR buckets 1 DAY buckets MICROSECOND resolution:
  • 38. @helenaedelson #kafkasummit 38 Want Can Or Currently Use Status But Kafka Security Kafka Security TLS, Kerberos, SASL, Auth, Encryption, Authentication v0.9.0 Thanks Jun! Integrated Streaming Kafka Streams processing inside Kafka, no alternate cluster setup or ops. v0.10 Thanks Guozhang! It's java :( Iw Cassandra CDC Cassandra CDC. Triggers? Tiggers are a pre-commit hook :( The Epic JIRA: https://issues.apache.org/jira/browse/ CASSANDRA-8844 no comment And... Kafka Streams & Kafka Connect Integration ..wait for it.. no comment Always on, X-DC Replication, Flexible Topologies Kafka, Cassandra OOTB Fault Tolerance Kafka, Spark, Mesos, Cassandra, Akka Baked In Location Transparency Kafka, Cassandra, Akka Check! Asynchrony Kafka, Cassandra, Akka Check! Decoupling Kafka, Akka Check! Pub-Sub Kafka, Cassandra, Akka Check! Immutability Kafka, Akka, Scala Check! My Nerdy Chart v2.0
  • 39. @helenaedelson #kafkasummit Kafka Streams in v 0.10 39 val builder = new KStreamBuilder()
 val stream: KStream[K,V] = builder.stream(des, des, "raw.data.topic") .flatMapValues(value -> Arrays.asList(value.toLowerCase.split(" ") .map((k,v) -> new KeyValue(k,v)) .countByKey(ser, ser, des, des, "kTable") .toStream stream.to("results.topic", ...) val streams = new KafkaStreams(builder, props) streams.start()
  • 40. @helenaedelson #kafkasummit Kafka Streams & Kafka Connect? 40 val builder = new KStreamBuilder() val stream1: KStream[K,V] = builder.stream(new CassandraConnect(configs)) .flatMapValues(..) .map((k,v) -> new KeyValue(k,v)) .countByKey(ser, ser, des, des, "kTable") .toStream stream.to("results.topic", ...) val streams = new KafkaStreams(builder, props) streams.start() YES
  • 41. @helenaedelson #kafkasummit 41 /** Writes records from Kafka to Cassandra asynchronously and non-blocking. */ override def put(records: JCollection[SinkRecord]): Unit /** Returns a list of records when available by polling for new records. */ override def poll: JList[SourceRecord]) https://github.com/tuplejump/kafka-connect-cassandra
  • 42. @helenaedelson #kafkasummit Frequency Capping 1. Count the number of times user X has seen ad Y from Advertiser A's Campaign C 2. Limit the max number of impressions of an ad within T1...T2 42 Use Case: Continuously count impressions grouped by campaign across DCs low-latency reads & writes Must scale Cross DC Counters Translation: Distributed Counters
  • 43. @helenaedelson #kafkasummit Redis? Broke under the load Aerospike? Great candidate Eventuate? Interesting, much lighter Kafka streams when it's out? Interesting, already in the infra Flink? Very interesting but... Cassandra Counters - not applicable for this 43 Frequency Capping
  • 44. @helenaedelson #kafkasummit As a distributed counting microservice As a key-value store for in-memory caching Fast reads - Very read heavy 99% reads are < 1 ms latency (sweet) 30,000 writes per second 350,000 reads per second on 7 nodes Replication factor 2: Cross datacenter replication (XDC), SSD-backed Excellent few posts by Dag, Tapads CTO on in-memory infrastructure + Ad Tech: (see resources slide) 44 Aerospike
  • 45. @helenaedelson #kafkasummit CRDT: Conflict Free Replicated Data Type State-based: objects require only eventual communication between pairs of replicas Operation-based: replication requires reliable broadcast communication with delivery in a well-defined delivery order Both guaranteed to converge towards common, correct state Keep replicas available for writes during a network partition requires resolution of conflicting writes when the partition heals 45
  • 46. @helenaedelson #kafkasummit Eventuate A toolkit for building distributed, HA & partition-tolerant event-sourced applications. Developed by Martin Krasser (@mrt1nz) for Red Bull Media (open source) Interactive, automated conflict resolution (via op-based CRDTs) Separates command side of an app from its query side (CQRS) Primary Goals: preserving causality, idempotency & event ordering guarantees even under chaotic conditions AP of CAP - conflicts cannot be prevented & must be resolved. Causality - tracked with Vector Clocks Adapters provide connectivity to other stream processing solutions Can currently chose Cassandra if desired Kafka coming soon! 46
  • 47. @helenaedelson #kafkasummit Replication of application state through async event replication across locations Locations consume replicated events to re- construct application state locally Multiple locations concurrently update as multi-master 47 Eventuate as Distributed CRDT Microservice
  • 48. @helenaedelson #kafkasummit 48 Applications can continue writing to a local replica during a network partition -> To Cassandra -> To Kafka (soon) Pass To Pipeline:
  • 49. @helenaedelson #kafkasummit 49 import scala.concurrent.Future
 import akka.actor.{ActorRef, ActorSystem}
 import com.rbmhtechnology.eventuate.crdt.{CRDTServiceOps, Counter, CounterService} class CappingService(val id: String, override val log: ActorRef)
 (implicit val system: ActorSystem,
 val integral: Integral[Int],
 override val ops: CRDTServiceOps[Counter[Int], Int])
 extends CounterService[Int](id, log) {
 
 /** Increment only op: adds `delta` to the counter identified by `id` * and returns the updated counter value. */
 def increment(id: String, delta: Int): Future[Int] =
 value(id) flatMap {
 case v if v >= 0 && (delta > 0 || delta > v) =>
 update(id, delta)
 case v =>
 Future.successful(v)
 }
 
 start()
 
 } import scala.concurrent.Future import akka.actor.ActorSystem val a = new CappingService(id1, eventLog)
 a.increment(id1, 3) // Future(3) 3 impressions
 a.value(id1) // Future(3) 3 impressions
 a.increment(id1, -2) // increments only, idempotent. val b = new CappingService(id2, eventLog) b.value(id1) // Future(a.value(id1)) Knows the same count over n-instances, all geo-locations, for the same id class CounterService[A : Integral](val replicaId: String, val log: ActorRef) { def value(id: String): Future[A] = { ... } def update(id: String, delta: A): Future[A] = { ... } }
  • 51. @helenaedelson #kafkasummit Eventuate Takeaway It's just a jar! OOTB async internal component messaging and fault tolerance Integrate with relevant microservices No store/cache cluster to deploy, just keep monitoring your apps Written in Scala Built on Akka - a toolkit for building highly concurrent, distributed, and resilient event- driven applications on the JVM 51
  • 53. @helenaedelson #kafkasummit Refresher: Sampling of RTB Events Ad Request Bid Request - JSON 100 bytes Compute optimal bid for advertiser Bid Response - JSON 1000 bytes (may include ad metadata) Win Notification (may or may not exist) with settlement price Ad Impression - when the ad is viewed Ad Click Ad Conversion 53
  • 54. @helenaedelson #kafkasummit 54 OpenRTB: objects in the Bid Request model
  • 55. @helenaedelson #kafkasummit TopK most high performing campaigns Number of views served in the last 7 days, by country, by city What determined successful ad conversions Age distribution per campaign 55 Streaming Analytics
  • 56. @helenaedelson #kafkasummit Spark Streaming Kafka class KafkaStreamingActor(ssc: StreamingContext) extends MyAggregationActor { val stream = KafkaUtils.createDirectStream(...).map(RawData(_)) stream .foreachRDD(_.toDF.write.format("filodb.spark") .option("dataset", "rawdata") .save())
 /* Pre-Aggregate data in the stream for fast querying and aggregation later stream.map(hour =>
 (hour.wsid, hour.year, hour.month, hour.day, hour.oneHourPrecip) ).saveToCassandra(timeseriesKeyspace, dailyPrecipTable) } 56 Can write to Cassandra, FiloDB...
  • 57. @helenaedelson #kafkasummit Machine Learning Train on 1+ week of data for Recommendations Bid Optimization Campaign Optimization Consumer Profiling ...and much more 57
  • 58. @helenaedelson #kafkasummit Machine Learning The probability of an ad, from a specific ISP, OS, website, demographic, etc. resulting in a conversion Which attributes of impressions are good predictors of better ad performance? 58
  • 59. @helenaedelson #kafkasummit Bid Optimization & Predictive Models Which impressions should an Advertiser bid for? Per campaign, per country it may run in..? What is the best bid for each impression 59
  • 60. @helenaedelson #kafkasummit 60 Compute optimal bid price Train the model Score bid requests Determine value of bid reqest Train on every bid req attribute Based on Campaign Objectives Against Budget Send bid decision to bidder Machine Learning
  • 61. @helenaedelson #kafkasummit Spark Streaming, MLLib & FiloDB 61 val ssc = new StreamingContext(sparkConf, Seconds(5))
 val kafkaStream = KafkaUtils.createDirectStream[..](..) .map(transformFunc) .map(LabeledPoint.parse) kafkaStream.foreachRDD(_.toDF.write.format("filodb.spark") .option("dataset", "training").save()) 
 val model = new StreamingLinearRegressionWithSGD()
 .setInitialWeights(Vectors.dense(weights)) .trainOn(dataStream.join(historicalEvents)) model.predictOnValues(dataStream.map(lp => (lp.label, lp.features))) .insertIntoFilo("predictions")
  • 62. @helenaedelson #kafkasummit 700 Queries Per Second: Spark Streaming & FiloDB Even for datasets with 15 million rows! Using FiloDB's InMemoryColumnStore Single host / MBP 5GB RAM SQL to DataFrame caching https://github.com/tuplejump/FiloDB Evan Chan's (@velvia) blog post NoLambda: A new architecture combining streaming, ad hoc, machine-learning, and batch analytics 62
  • 63. @helenaedelson #kafkasummit 63 Eventually Consistent Across DCs US-East-1 MirrorMaker EU-west-1 RTB micro services RTB micro services RTB micro services Publishers Subscribers Subscribers Publishers Kafka Cluster Per Region ZK ZK Mgmt micro services Mgmt micro services Mgmt micro services Query Layer Analytics & ML Cluster Timeseries Cluster Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Spark Streaming & ML Cassandra Cross DC Replication Topology Aware Spark Streaming & ML Cassandra Compute Layer
  • 64. @helenaedelson #kafkasummit Self-Healing Systems Massive event spikes & bursty traffic Fast producers / slow consumers Network partitioning & out of sync systems DC down Not DDOS'ing ourselves from fast streams No data loss when auto- scaling down 64
  • 65. @helenaedelson #kafkasummit Byzantine Fault Tolerance? 65 Looks like I'll miss standup
  • 66. @helenaedelson #kafkasummit Everything fails, all the time Monitor Everything 66
  • 67. @helenaedelson #kafkasummit Non-Monotonic Snapshot Isolation: scalable and strong consistency for geo-replicated transactional systems Conflict-free Replicated Data Types Implementing operation-based CRDTs http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh http://martinfowler.com/bliki/CQRS.html http://github.com/openrtb/OpenRTB http://akka.io http://rbmhtechnology.github.io/eventuate https://github.com/RBMHTechnology/eventuate http://rbmhtechnology.github.io/eventuate/user-guide.html#commutative-replicated-data-types http://www.planetcassandra.org/data-replication-in-nosql-databases-explained http://wikibon.org/wiki/v/Optimizing_Infrastructure_for_Analytics-Driven_Real-Time_Decision_Making Resources 67