Apache Kafka is a distributed publish-subscribe messaging system that uses a distributed commit log to store messages. It allows applications to publish and subscribe to streams of records. The document discusses some similarities and differences between using MySQL and Kafka for messaging, such as Kafka's ability to horizontally scale by adding more brokers with multiple partitions, versus the single partition in a MySQL instance. While unconventional, the document proposes that MySQL could potentially be used as a messaging system like Kafka.
11. • Producers
publish
messages
to
a
topic.
• Topic
is
just
a
par))oned
write-‐ahead
log.
Producers
APPEND
records
to
these
logs.
12. • Producers
publish
messages
to
a
topic.
• Topic
is
just
a
par))oned
write-‐ahead
log.
Producers
APPEND
records
to
these
logs.
• Every
message
is
at
a
OFFSET
in
the
log.
13. • Producers
publish
messages
to
a
topic.
• Topic
is
just
a
par))oned
write-‐ahead
log.
Producers
APPEND
records
to
these
logs.
• Every
message
is
at
a
OFFSET
in
the
log.
• Consumers
consume
messages
from
logs
using
offset
25. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
26. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
27. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
• Mul)ple
Par))ons
in
a
ka5a
broker
Versus
28. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
• Mul)ple
Par))ons
in
a
ka5a
broker
Versus
– Single
par))on(binlog)
in
a
MySQL
instance
29. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
• Mul)ple
Par))ons
in
a
ka5a
broker
Versus
– Single
par))on(binlog)
in
a
MySQL
instance
• Data
Reten)on
?
30. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
• Mul)ple
Par))ons
in
a
ka5a
broker
Versus
– Single
par))on(binlog)
in
a
MySQL
instance
• Data
Reten)on
?
– How
long
you
keep
the
binlogs.
31. What
about
…
• Replicas?
– MySQL
Master
–
Slave
• Horizontally
Scalable
?
– Add
more
MySQL
instances
(split
write)
• Mul)ple
Par))ons
in
a
ka5a
broker
Versus
– Single
par))on(binlog)
in
a
MySQL
instance
• Data
Reten)on
?
– How
long
you
keep
the
binlogs.
• Transac)ons
for
free
versus
no
txn
in
ka5a