anomaly detection fault tolerance anticipation
play

Anomaly Detection Fault Tolerance Anticipation Patterns John - PowerPoint PPT Presentation

Anomaly Detection Fault Tolerance Anticipation Patterns John Allspaw SVP, Tech Ops Qcon London 2012 Wednesday, March 7, 12 Four Cornerstones Erik Hollnagel (Anticipation) (Response) Knowing Knowing Knowing Knowing What What What


  1. Anomaly Detection Fault Tolerance Anticipation Patterns John Allspaw SVP, Tech Ops Qcon London 2012 Wednesday, March 7, 12

  2. Four Cornerstones Erik Hollnagel (Anticipation) (Response) Knowing Knowing Knowing Knowing What What What What To Expect To Do To Look For Has Happened (Monitoring) (Learning) Wednesday, March 7, 12

  3. Four Cornerstones Erik Hollnagel (Anticipation) (Response) Knowing Knowing Knowing Knowing What What What What To Expect To Do To Look For Has Happened (Monitoring) (Learning) Wednesday, March 7, 12

  4. Four Cornerstones Erik Hollnagel (Anticipation) (Response) Knowing Knowing Knowing Knowing What What What What To Expect To Do To Look For Has Happened (Monitoring) (Learning) Wednesday, March 7, 12

  5. Anomaly Detection Wednesday, March 7, 12

  6. Anomaly Detection • Getting at the state of health • Evaluating the state of health • Components AND systems Wednesday, March 7, 12

  7. Supervisory Example: Active health check check_http Component Monitor (webserver) exit 0 200 OK Wednesday, March 7, 12

  8. Supervisory check_http Pros: Component Monitor Easy to implement (webserver) Easy to understand exit 0 200 OK Well-known pattern Cons: Messaging can fail Scalability is limited Wednesday, March 7, 12

  9. Supervisor Sensitivity 1 sec timeout 1 retry 3 sec interval 1s 1s X X 3s 3 3 3 3 3 3 3 (7.9 sec exposure) Up to ~2.9s for the previous interval Wednesday, March 7, 12

  10. Supervisor Sensitivity Request latency (max = 0.9s) Schedule check_http Latency Component Monitor (max = N) (webserver) exit 0 200 OK Response latency (max = 0.9s) Wednesday, March 7, 12

  11. Supervisor Sensitivity How many seconds of errors can you tolerate serving? Wednesday, March 7, 12

  12. Supervisory Example: Interval Passive health check Component Monitor (webserver) DISK consumption exit 0 within bounds Wednesday, March 7, 12

  13. Supervisory Example: Interval Passive health check Pros: Efficient Component Monitor (webserver) Scalability is different exit 0 DISK Fewer moving parts consumption within bounds Less exposure Can submit to multiple places Cons: Nonideal for network-based services Different tuning (windowed expectation) Wednesday, March 7, 12

  14. Supervisory Example: Passive health check ✓ { ✓ Interval ✓ ? E M ? Component I ✓ T ✓ Wednesday, March 7, 12

  15. Supervisory Example: Passive health check ✓ ✓ ✓ { ? Interval Interval Schedule ? Component ✓ Latency E M ✓ I T Exposure = (Schedule + Interval )*UnknownConsecutiveIntervals+1 Wednesday, March 7, 12

  16. Frequency and Transience Probability Probability Of False Of Positives Nondetection Short intervals Long intervals Low # of retries High # of retries Short timeouts Long timeouts Wednesday, March 7, 12

  17. In-Line Example: Passive application event logging monitor application Wednesday, March 7, 12

  18. Supervisory Example: Passive application event logging monitor application Pros: On-demand publish Cons: Onus is on the app Can’t be 100% sure it’s working Wednesday, March 7, 12

  19. Supervisory Example: Passive application event logging monitor application Positive events (sales, registrations, etc.) Negative events (errors, exceptions, etc.) Lack or presence of data mean different things, so history is paramount. Wednesday, March 7, 12

  20. Context Wednesday, March 7, 12

  21. Evaluation what is ‘abnormal’ ? Wednesday, March 7, 12

  22. 10 9 Response Time 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Time Wednesday, March 7, 12

  23. Static Thresholds 10 9 Critical Response Time 8 7 Warning 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Time Wednesday, March 7, 12

  24. Static Thresholds 10 9 Critical Response Time 8 7 Warning 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Time Wednesday, March 7, 12

  25. Static Thresholds 10 9 Critical Response Time 8 7 Warning 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Time Wednesday, March 7, 12

  26. Static Thresholds 10 9 Critical Response Time 8 7 Warning 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Time Wednesday, March 7, 12

  27. Static Thresholds Wednesday, March 7, 12

  28. Static Thresholds Wednesday, March 7, 12

  29. Context Normal? Wednesday, March 7, 12

  30. Context 24 hours Wednesday, March 7, 12

  31. Context 7 days Wednesday, March 7, 12

  32. Context Normal But Noisy Wednesday, March 7, 12

  33. Context Smoothing? Wednesday, March 7, 12

  34. Context Holt-Winters Exponential Smoothing Recent points influencing a forecast, exponentially decreasing influence backwards in time. en.wikipedia.org/wiki/Exponential_smoothing Wednesday, March 7, 12

  35. Context Aberrant Behavior Detection in Time Series for Network Monitoring http://static.usenix.org/events/lisa00/ full_papers/brutlag/brutlag_html/ Wednesday, March 7, 12

  36. Dynamic Thresholds Wednesday, March 7, 12

  37. Dynamic Thresholds Upper bound Raw data Lower bound Wednesday, March 7, 12

  38. Dynamic Thresholds Hrm.... Wednesday, March 7, 12

  39. Dynamic Thresholds Hrm.... Wednesday, March 7, 12

  40. Dynamic Thresholds Holt-Winters Aberration Ah! Wednesday, March 7, 12

  41. Dynamic Thresholds Graphite metrics collection w/Holt-Winters abberations http://graphite.wikidot.com/ Nagios check for Graphite data https://github.com/etsy/nagios_tools/blob/master/check_graphite_data Wednesday, March 7, 12

  42. Four Cornerstones Erik Hollnagel (Anticipation) (Response) Knowing Knowing Knowing Knowing What What What What To Expect To Do To Look For Has Happened (Monitoring) (Learning) Wednesday, March 7, 12

  43. FAULT TOLERANCE Wednesday, March 7, 12

  44. Detection of fault X Triggers corrective action Y Clean up, report back (RECOVERY OR MASKING) Wednesday, March 7, 12

  45. Variation Tolerance Wednesday, March 7, 12

  46. Adaptive Systems Expected Variation Wednesday, March 7, 12

  47. Adaptive Systems Expected Variation Wednesday, March 7, 12

  48. Adaptive Systems Expected Variation Wednesday, March 7, 12

  49. New Disturbances Compensation is Arise Exhausted Disturbance Expected Variation Control compensation decompensation Woods, 2011 Wednesday, March 7, 12

  50. New Disturbances Compensation is Arise Exhausted Disturbance Expected Variation Control compensation decompensation Wednesday, March 7, 12

  51. New Disturbances Compensation is Arise Exhausted Variation Disturbance Expected Fault Variation Control compensation decompensation Wednesday, March 7, 12

  52. Variations != Faults Wednesday, March 7, 12

  53. Dead Corrupt Late Wrong Wednesday, March 7, 12

  54. Fault Tolerance Redundancy Spatial (server, network, process) Temporal (checkpoint, “rollback”) Informational (data in N locations) Wednesday, March 7, 12

  55. Fault Tolerance Redundancy Spatial (server, network, process) Temporal (checkpoint, “rollback”) Informational (data in N locations) Wednesday, March 7, 12

  56. Spatial Redundancy 2 2 Wednesday, March 7, 12

  57. Spatial Redundancy Active/Active Wednesday, March 7, 12

  58. Spatial Redundancy Active/Passive Wednesday, March 7, 12

  59. Spatial Redundancy Roaming Spare Dedicated Spare Wednesday, March 7, 12

  60. In-Line Fault Tolerance PHP App (thrift client) Thrift Search (Lucene/Solr) • Connect timeout • Send timeout • Receive timeout Wednesday, March 7, 12

  61. In-Line Fault App Tolerance X Search (Lucene/Solr) 1. App attempts connection, can’t 2. Caches APC user object with 60s “TTL” key=server:port 3. Moves to next server in rotation, skipping any found in APC Wednesday, March 7, 12

  62. In-Line Fault Tolerance http://thrift.apache.org/ /lib/php/src/TSocketPool.php Wednesday, March 7, 12

  63. In-Line Fault Tolerance Pros: Distributed checking and perspective Handles transient failures Auto-recovery Cons: Onus is on the app for implementation Wednesday, March 7, 12

  64. Fault Tolerance Nagios Event Handlers Attempt to recover from specific conditions Chain together recovery actions http://nagios.sourceforge.net/docs/3_0/ eventhandlers.html Wednesday, March 7, 12

  65. If (fault X) then HUP process; re-check If (OK) then notify+exit ELSE Hard restart process; re-check If (OK) then notify+exit ELSE Remove from production; notify+exit Wednesday, March 7, 12

  66. How many seconds of errors can you tolerate serving? Wednesday, March 7, 12

  67. Fail Closed When fault is found, and can’t be recovered or masked, operations cease to protect the rest of the system from damage. Wednesday, March 7, 12

  68. Depth and Dependencies Load Balancers Monitor Health check App DB Wednesday, March 7, 12

  69. Depth and Dependencies WARNING: Load Balancers Monitor Health check Don’t be too App crazy DB Wednesday, March 7, 12

  70. Fail Closed Aggregate Cluster Checking X X X X If (clusterfail > 25%) then notify+exit ELSE OK Wednesday, March 7, 12

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