self healing in streaming systems
play

Self Healing in Streaming Systems #UW Database Day Dec 2nd, 2016 - PowerPoint PPT Presentation

Self Healing in Streaming Systems #UW Database Day Dec 2nd, 2016 Karthik Ramasamy Twi/er @karthikz 2 What is self healing? A self healing system adapts itself as their environmental condi8ons


  1. Self Healing in Streaming Systems #UW Database Day Dec 2nd, 2016 Karthik ¡Ramasamy ¡ Twi/er @karthikz

  2. 2 What is self healing? A ¡self ¡healing ¡system ¡adapts ¡itself ¡as ¡their ¡ environmental ¡condi8ons ¡change ¡and ¡con8nue ¡to ¡produce ¡ results

  3. 3 Why? Time/cri8cal& Decisions& Value&of&Data&to&Decision/Making& Informa9on&Half%Life& In&Decision%Making& Preven8ve/& Predic8ve & Tradi8onal&“Batch”&&&&&&&&&&&&&&& Business && Intelligence & Ac8onable & Reac8ve & Historical & Real%& Seconds& Minutes& Hours& Days& Months& [1] ¡Courtesy ¡Michael ¡Franklin, ¡BIRTE, ¡2015. ¡ Time& Time&

  4. 4 Why? loss of revenue sla violations quality of life increased productivity Ü � G s Impact of not honoring Impact of downtime Engineers & SRE burnt With reduced incidents, an SLA leading to popular event such as out attending to engineers can focus on penalty payments Super Bowl incidents actual development Oscars, etc

  5. 5 Real-Time Budget > 1 hour < 500 ms < 1 ms 10 ms - 1 sec latency sensitive low latency high throughput approximate BATCH Near Real REAL TIME OLTP Time deterministic adhoc monthly active users ad impressions count fanout Tweets Financial workflows queries relevance for ads hash tag trends search for Tweets Trading

  6. 6 Streaming Variants STREAM WORKFLOWS Con8nuous ¡ process ¡ of ¡ events ¡ for ¡a ¡determinis8c ¡workflow C H H Analyze ¡and ¡act ¡on ¡data ¡ Con8nuously ¡analyze ¡data ¡ with ¡con8nuous ¡queries ¡ using ¡mathema8cal ¡& ¡ sta8s8cal ¡techinques STREAM STREAM ANALYTICS PROCESSING

  7. 7 Heron Topology % % Bolt 1 Spout 1 Bolt 4 % Bolt 2 % Spout 2 Bolt 5 % Bolt 3

  8. 8 Heron Topology - Physical Execution % % % % % % Bolt 1 Spout 1 Bolt 4 % % % Bolt 2 % % % Spout 2 Bolt 5 % % % Bolt 3

  9. 9 Heron Topology 1 Scheduler Topology 2 Topology Submission Topology N

  10. 10 Heron Topology Components Logical Plan, Physical Plan and Topology Execution State Master ZK Cluster Sync Physical Plan MASTER CONTAINER Metrics Stream Stream Metrics Manager Manager Manager Manager I 2 I 3 I 4 I 1 I 1 I 2 I 3 I 4 DATA CONTAINER DATA CONTAINER

  11. 11 Heron @Twitter > ¡500 ¡Real ¡ Time ¡Jobs 500 ¡Billions ¡Events/Day ¡ PROCESSED 25-­‑200 ¡ MS ¡ latency

  12. 12 Common Operational Issues . / - 01 02 03 Slow Hosts Network Issues Data Skew

  13. 13 Slow Hosts g Memory Parity Errors G Impeding Disk Failures � Lower GHZ

  14. 14 Heron Backpressure % % % B4 S1 B2 B3

  15. 15 Stream Manager B2 S1 S1 B2 Stream Stream Manager Manager B3 B4 B3 B4 S1 B2 S1 B2 Stream Stream Manager Manager B3 B4 B3

  16. 16 Spout Backpressure B2 S1 S1 S1 S1 B2 Stream Stream Manager Manager B3 B4 B3 B4 B2 S1 S1 B2 S1 S1 Stream Stream Manager Manager B3 B4 B3 Can ¡we ¡do ¡beWer?

  17. 17 Network g Network Slowness G Network Partitioning

  18. 18 Network Slowness I Delays processing Data is Timeliness of accumulating results is a ff ected

  19. 19 Network Slowness Can ¡we ¡do ¡beWer?

  20. 20 Network Partitioning Topology Topology Stream Scheduler Manager Master Master Stream Stream Stream Scheduler Manager Manager Manager

  21. 21 Network Partitioning Topology Scheduler Master g New Master Container G Acquiring Mastership in ZooKeeper fails � Master Container Dies

  22. 22 Network Partitioning Topology Stream Manager Master TMaster thinks g data container failed Waits for the scheduler G to reschedule new data container � Never happens

  23. 23 Network Partitioning Stream Stream Manager Manager g Cannot exchange data G Data accumulates � Chaos ensues! Can ¡we ¡do ¡beWer?

  24. 24 Network Partitioning Stream Scheduler Manager New data container g spawned TMaster realizes two G data containers report as the same Does not accept � the new one and eventually it dies

  25. 25 Data Skew Single Key Single ¡ key ¡ maps ¡ into ¡ a ¡ instance ¡and ¡its ¡count ¡is ¡high C H Several ¡keys ¡map ¡into ¡ single ¡instance ¡and ¡their ¡ count ¡is ¡high Multiple Keys

  26. 26 Data Skew - Multiple Keys % % % % % % % % Bolt 1 Spout 1 Bolt 4 % % % Bolt 2 % % % Spout 2 Bolt 5 % % % Bolt 3

  27. 27 Data Skew - Single Key % % % % % % % % % Bolt 1 Spout 1 Bolt 4 % % % Bolt 2 % % % Spout 2 Bolt 5 % % % What ¡happens ¡if ¡the ¡skew ¡is ¡temporary? Bolt 3

  28. 28 Rack Failures Single Rack Outage ¡of ¡a ¡single ¡rack C H Outage ¡of ¡several ¡racks ¡ simultaneously Multiple Rack

  29. 29 Rack Local vs Rack Diversity Rack Local Rack Diversity Advantage ¡of ¡reduced ¡network ¡ Higher ¡network ¡latency ¡and ¡shared ¡ latency ¡and ¡high ¡p2p ¡bandwidth bandwidth

  30. 30 Single Rack Failure Rack Local Rack failure { If ¡job ¡is ¡rack ¡local ¡en8re ¡job ¡is ¡down ¡and ¡needs ¡ to ¡be ¡rescheduled � Impact on real timeliness Depends ¡on ¡the ¡applica8on

  31. 31 Single Rack Failure Rack failure { Rack Diversity If ¡job ¡is ¡rack ¡diverse ¡impact ¡is ¡minimal � Impact on real timeliness Is ¡affected ¡less ¡-­‑ ¡depending ¡on ¡how ¡many ¡ containers ¡are ¡running

  32. 32 Conclusion � Self ¡healing ¡is ¡important ¡in ¡Streaming ¡systems � Key ¡opera8onal ¡issues ¡-­‑ ¡Slow ¡hosts, ¡network ¡and ¡data ¡skew G These ¡requirements ¡make ¡the ¡streaming ¡systems ¡more ¡complex

  33. 33 Interested in Heron? HERON IS OPEN SOURCED CONTRIBUTIONS ARE WELCOME! https://github.com/twitter/heron http://heronstreaming.io FOLLOW US @HERONSTREAMING

  34. 34 Any Questions ??? WHAT WHY WHERE WHEN WHO HOW

  35. 35 Thanks For Listening @karthikz

  36. 36 Detections and Resolutions Proac8ve Affects ¡real-­‑8me ¡ ¡ Keeps ¡up ¡with ¡real-­‑8me (depends ¡on ¡applica8on ¡tolerance) ¡ DetecDons Reac8ve Full ¡manual ¡interven8on N/A Lazy Instant ResoluDons

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend