Top Banner
a Supposi)on: “ can MySQL be Ka5a ? ” vishnu rao – pocketmath.com
34
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: a wild Supposition: can MySQL be Kafka ?

a  Supposi)on:  “  can  MySQL  be  Ka5a  ?  ”  

vishnu  rao  –  pocketmath.com  

Page 2: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

Page 3: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

Page 4: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  

Page 5: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  – Producer  

Page 6: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  – Producer  – Topic  

Page 7: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  – Producer  – Topic  – Consumer  

Page 8: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  – Producer  – Topic  – Consumer  – Message  offset    

Page 9: a wild Supposition: can MySQL be Kafka ?

Apache  Ka5a  

•  A  publish-­‐subscribe  messaging  system  implemented  as  distributed  commit  log.  

•  No)ons:  – Producer  – Topic  – Consumer  – Message  offset  – Broker    

Page 10: a wild Supposition: can MySQL be Kafka ?

•  Producers  publish  messages  to  a  topic.      

Page 11: a wild Supposition: can MySQL be Kafka ?

•  Producers  publish  messages  to  a  topic.      •  Topic  is  just  a  par))oned  write-­‐ahead  log.  Producers  APPEND  records  to  these  logs.  

 

Page 12: a wild Supposition: can MySQL be Kafka ?

•  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.  

Page 13: a wild Supposition: can MySQL be Kafka ?

•  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  

Page 14: a wild Supposition: can MySQL be Kafka ?
Page 15: a wild Supposition: can MySQL be Kafka ?
Page 16: a wild Supposition: can MySQL be Kafka ?
Page 17: a wild Supposition: can MySQL be Kafka ?
Page 18: a wild Supposition: can MySQL be Kafka ?
Page 19: a wild Supposition: can MySQL be Kafka ?
Page 20: a wild Supposition: can MySQL be Kafka ?
Page 21: a wild Supposition: can MySQL be Kafka ?
Page 22: a wild Supposition: can MySQL be Kafka ?
Page 23: a wild Supposition: can MySQL be Kafka ?

What  about  …  

•  Replicas?  

Page 24: a wild Supposition: can MySQL be Kafka ?

What  about  …  

•  Replicas?  – MySQL  Master  –  Slave  

Page 25: a wild Supposition: can MySQL be Kafka ?

What  about  …  

•  Replicas?  – MySQL  Master  –  Slave  

•  Horizontally  Scalable  ?  

Page 26: a wild Supposition: can MySQL be Kafka ?

What  about  …  

•  Replicas?  – MySQL  Master  –  Slave  

•  Horizontally  Scalable  ?  – Add  more  MySQL  instances  (split  write)  

Page 27: a wild Supposition: can MySQL be Kafka ?

What  about  …  

•  Replicas?  – MySQL  Master  –  Slave  

•  Horizontally  Scalable  ?  – Add  more  MySQL  instances  (split  write)  

•  Mul)ple  Par))ons  in  a  ka5a  broker  Versus  

Page 28: a wild Supposition: can MySQL be Kafka ?

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  

Page 29: a wild Supposition: can MySQL be Kafka ?

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  ?  

Page 30: a wild Supposition: can MySQL be Kafka ?

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.  

Page 31: a wild Supposition: can MySQL be Kafka ?

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  

Page 32: a wild Supposition: can MySQL be Kafka ?

     

This  approach  might  seem  unconven)onal  &  unorthodox.  

     

Page 33: a wild Supposition: can MySQL be Kafka ?

     

This  approach  might  seem  unconven)onal  &  unorthodox.  

     

hence  It’s  a  WILD  supposi)on  “MySQL  can  be  Ka5a.”  

Page 34: a wild Supposition: can MySQL be Kafka ?

Thank  you.  

We  are  Hiring!  h]p://www.pocketmath.com/jobs.html  

 [email protected]  [email protected]  sweetweet213@twi]er