injecting diversity into running software systems
play

Injecting Diversity Into Running Software Systems Vivek Nallur - PowerPoint PPT Presentation

W HAT S THIS ABOUT ? The Big Idea Injecting Diversity Into Running Software Systems Vivek Nallur Trinity College Dublin 16-May-2014 W HAT S THIS ABOUT ? The Big Idea E FFECTS OF M ONOCULTURE Figure: Phytophthora infestans W HAT S


  1. W HAT ’ S THIS ABOUT ? The Big Idea Injecting Diversity Into Running Software Systems Vivek Nallur Trinity College Dublin 16-May-2014

  2. W HAT ’ S THIS ABOUT ? The Big Idea E FFECTS OF M ONOCULTURE Figure: Phytophthora infestans

  3. W HAT ’ S THIS ABOUT ? The Big Idea E VEN IN THE SOFTWARE WORLD Slammer attacked only one combination: Win2k + MSSQL

  4. W HAT ’ S THIS ABOUT ? The Big Idea E VEN IN THE SOFTWARE WORLD ◮ ˜75k hosts in 30 mins!

  5. W HAT ’ S THIS ABOUT ? The Big Idea F UNDAMENTAL P REMISE 1. Diversity is not just a good-to-have , but essential 2. Robustness is a quality attribute that we would like our systems to have 3. Robustness can be increased by injecting Diversity

  6. W HAT ’ S THIS ABOUT ? The Big Idea DIVERSIFY - FET FP7 P ROJECT Partners Investigating Diversification at Various Levels 1. Inria (France) 2. Sintef (Norway) 3. Trinity College Dublin (Ireland) 4. Universit´ e de Rennes 1 (France)

  7. W HAT ’ S THIS ABOUT ? The Big Idea G ENETIC D IVERSITY 1. Not necessarily vastly different, but just different enough 2. An algorithm is the genetic heart of a software system 3. Algorithm diversification is a good candidate for genetic diversification

  8. W HAT ’ S THIS ABOUT ? The Big Idea A LGORITHM D IVERSIFICATION 1. There exists natural diversity amongst algorithms 2. In any domain, there are multiple algorithms that do the same thing, better, faster, etc. 3. We use load-balancing as our domain, for now

  9. W HAT ’ S THIS ABOUT ? The Big Idea L OAD B ALANCING 1. Fundamental Idea: Distribute incoming traffic amongst pool of machines, such that two goals are satisfied: 1.1 Response time is minimized 1.2 Failure rate is minimized 2. Many algorithms exist: round-robin, dynamic round-robin, leastconn, header-Hashing, parameter-Hashing, uri-Hashing, rdp-cookie , etc. 3. Each makes assumptions about the nature of traffic being encountered

  10. W HAT ’ S THIS ABOUT ? The Big Idea N ATURE OF T RAFFIC 1. Traffic depends on type of content: 1.1 Static web-pages, like wikipedia, blogs, articles, etc. 1.2 Dynamic web-pages, like weather, traffic, news, youtube, etc. 1.3 Sticky (personalized) like facebook, twitter, etc. 2. The algorithms mentioned previously, improve response times for these workloads 3. Specialist algorithms for specialist patterns

  11. W HAT ’ S THIS ABOUT ? The Big Idea P ATTERNS , N OISE , ETC . 1. In a DDoS attack, traffic pattern is random 2. Failure-rate rather than response time becomes more important 3. Generalist algorithm for all patterns of workload, doesn’t exist

  12. W HAT ’ S THIS ABOUT ? The Big Idea C HANGE A LGORITHMS 1. Currently, sysadmins have to consider their workloads and choose one algorithm 2. When pattern of traffic changes, or website gets hit by a DDoS attack, the prevailing algorithm’s assumptions are invalid 3. What if we modify the algorithm when the traffic pattern changes? 4. Can we do better than random?

  13. W HAT ’ S THIS ABOUT ? The Big Idea A DAPTATION VIA A LGORITHM S WAPPING 1. Modify load-balancer to work on a pool of algorithms , instead of one 2. Cycle through the pool, every n seconds 3. In the worst case: 3.1 Algorithm completely unsuited for traffic pattern = ⇒ high failure 3.2 But it lasts only for n seconds!

  14. W HAT ’ S THIS ABOUT ? The Big Idea C REATING A P OOL OF A LGORITHMS 1. Choose haproxy as an industrial-strength load-balancer 2. Use all the algorithms implemented by haproxy 3. Number of combinations: 7 C 2 —- 7 C 7 !! 4. Potential behavioural diversity is very high!

  15. W HAT ’ S THIS ABOUT ? The Big Idea D OES THIS WORK ? 1. We want to decrease failure-rate 2. So measure dropped requests 3. In the presence of a cloud of VMs hitting the load-balancer 4. Pools defined as: 4.1 7 C 1 — class A — baseline 4.2 7 C 3 — class B 4.3 7 C 4 — class C 4.4 7 C 7 — class D

  16. W HAT ’ S THIS ABOUT ? The Big Idea E XPERIMENTAL C ONDITIONS 1. Workload: 3 Virtual Machines 2. Load-Balancer: 1 haproxy 3. Load-Generators: 13 Virtual Machines Note: We want to overwhelm haproxy , not the workload machines

  17. W HAT ’ S THIS ABOUT ? The Big Idea N ORMAL P ERFORMANCE OF H APROXY 45 40 35 % Requests dropped 30 25 20 15 hdrHost leastconn roundrobin static−rr uri Figure: Each pool containing one algorithm – all of class A

  18. W HAT ’ S THIS ABOUT ? The Big Idea D IVERSIFIED P ERFORMANCE OF H APROXY 10 % Requests dropped 8 6 4 roundrobin−uri−hdrHost static−rr−leastconn−hdrHost Figure: class B

  19. W HAT ’ S THIS ABOUT ? The Big Idea D IVERSIFIED P ERFORMANCE OF H APROXY 40 % Requests dropped 30 20 10 leastconn−source−uri−rdpcookie roundrobin−leastconn−uri−hdrHost Figure: class C

  20. W HAT ’ S THIS ABOUT ? The Big Idea D IVERSIFIED P ERFORMANCE OF H APROXY 7.0 % Requests dropped 6.5 6.0 5.5 5.0 Figure: class D

  21. W HAT ’ S THIS ABOUT ? The Big Idea A LL TOGETHER NOW 40 % Requests dropped 30 20 10 A B C D Algorithm combination Figure: Robustness across pools

  22. W HAT ’ S THIS ABOUT ? The Big Idea S TATISTICAL E VIDENCE diff lwr upr p adj B- A − 20 . 622 − 30 . 632 − 10 . 612 0 . 00001 C- A − 9 . 329 − 19 . 340 0 . 681 0 . 076 D- A − 22 . 160 − 36 . 317 − 8 . 004 0 . 001 Table: Significance of long-run differences in failure rate diff lwr upr p adj B- A -1 , 073 . 833 -2 , 638 . 443 490 . 777 0 . 276 C- A 50 . 333 -1 , 514 . 277 1 , 614 . 943 1 . 000 D- A -1 , 523 -3 , 735 . 693 689 . 693 0 . 273 Table: No significance of long-run differences in median response time

  23. W HAT ’ S THIS ABOUT ? The Big Idea E XPERIMENT V ALIDITY 1. Sample size: 6 samples per pool 2. Anova & Tukey test pass for statistical significance 3. Failure-rate improved; Response time same!! 4. Only static workload 5. Dynamic & Sticky workloads missing

  24. W HAT ’ S THIS ABOUT ? The Big Idea D IVERSITY ISN ’ T ALL GREAT :( 45 40 40 35 % Requests dropped % Requests dropped 30 30 25 20 20 10 15 hdrHost leastconn roundrobin static−rr uri leastconn−source−uri−rdpcookie roundrobin−leastconn−uri−hdrHost

  25. W HAT ’ S THIS ABOUT ? The Big Idea S O , IT ’ S STILL RANDOM CHOICE 1. Not exactly. We can measure inter-algorithm distance 2. Sort of. 3. We can use Normalized Compression Distance 4. Used in many free-text domains NCD Z ( x , y ) = maxK ( x | y ) , K ( y | x ) maxK ( x ) , K ( y )

  26. W HAT ’ S THIS ABOUT ? The Big Idea Figure: Clustering on code of algorithm implementation

  27. W HAT ’ S THIS ABOUT ? The Big Idea U SING NCD 1. Not all pools are created equal 2. Selecting from pool, might be better than random choice 3. Pre-compute pool diversity?

  28. W HAT ’ S THIS ABOUT ? The Big Idea W HAT ’ S THE NET RESULT ? 1. No definitive answers 2. But promising experiments 3. Obviously more required

  29. W HAT ’ S THIS ABOUT ? The Big Idea T HAT ’ S ALL , FOLKS ! Questions, Suggestions...

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