the many flavors
play

the many flavors Keith Stobie Doyenz (while at Microsoft) Copies - PowerPoint PPT Presentation

Testing In Production the many flavors Keith Stobie Doyenz (while at Microsoft) Copies may not be made or distributed for commercial use Pre-Requisites (risk reduction) Redundancy state quickly recovered if catastrophic failure,


  1. Testing In Production the many flavors Keith Stobie Doyenz (while at Microsoft) Copies may not be made or distributed for commercial use

  2. Pre-Requisites (risk reduction) • Redundancy – state quickly recovered if catastrophic failure, • Data corruption or state-related failures extremely unlikely ( functional testing must first be passing), • Errors must be detected and the engineering team (rather than operations) must be monitoring system health of the code in test • Can quickly roll back all changes Rollback tested before going into production 2011-10-10 PNSQC Testing in Production -- Keith Stobie 2 Copies may not be made or distributed for commercial use

  3. Image from : http://blogs.msdn.com/b/seliot/archive/2011/06/07/testing-in-production-tip-it-really-happens-and-that-s-a-good-thing.aspx Isolate Test Data • Don’t let test data affect Production metrics. Can’t bill for test data! • Number of users requests must be distinct from test requests. • Is test data visible? Fake products? 2011-10-10 PNSQC Testing in Production -- Keith Stobie 3 Copies may not be made or distributed for commercial use

  4. Exposure Control Growing visibility (exposure / risk ) • Opt-in: Preview, Beta, . . . • Google: Internal, Friends&Family, Beta, . . . • % of Machines/DCs : 1 %, 5%, 10%, 25% 50% • Markets: US, Europe, Asia, America 2011-10-10 PNSQC Testing in Production -- Keith Stobie 4 Copies may not be made or distributed for commercial use

  5. Asserts == Testing • Leave asserts that don’t significantly impact performance. Assert(inputRef != null) (if not in frequent path) • Self-test, like hardware, some software has low-pri thread for idle times to walk and verify data structures, etc. 2011-10-10 PNSQC Testing in Production -- Keith Stobie 5 Copies may not be made or distributed for commercial use

  6. Monitoring == Testing % of requests Threshold • Example: In Testbed, 50% 100ms is the response time 90% 200ms < threshold(s)? 99% 300ms • Monitor same thresholds in production: – External “synthetic” transactions – Real time data collection • Transactional availability • Feature availability • “pure” monitor is a test Oracle 2011-10-10 PNSQC Testing in Production -- Keith Stobie 6 Copies may not be made or distributed for commercial use

  7. Delta Assertion (Meszaros) Image from : http://xunitpatterns.com/Delta%20Assertion.html 2011-10-10 PNSQC Testing in Production -- Keith Stobie 7 Copies may not be made or distributed for commercial use

  8. Model of a Service Backend User Frontend Service service Requests service Data Data Feed 2011-10-10 PNSQC Testing in Production -- Keith Stobie 8 Copies may not be made or distributed for commercial use

  9. (Offline) Test in Production Environment Backend User Frontend Service service Requests service Data Data Feed Production Environment (Identical Hardware, operations, etc.) Test 2011-10-10 PNSQC Testing in Production -- Keith Stobie 9 Copies may not be made or distributed for commercial use

  10. Fork(copy) Traffic (drop test return) User Frontend Backend Service Requests service service Productio Data Production n Data Feed Test Test Backend Service service Data Data Feed 2011-10-10 PNSQC Testing in Production -- Keith Stobie 10 Copies may not be made or distributed for commercial use

  11. Experiment with Graphics/Color • Which one converts (to search) better? A B Source: Marketing Experiments 2011-10-10 PNSQC Testing in Production -- Keith Stobie 11 http://www.marketingexperiments.com Copies may not be made or distributed for commercial use

  12. A/B Test 50% 50% Visitors Randomly Distributed Version A Version B (Control) (Treatment) Page Title Title of Page Signup Signup Here Here Click Thru Rate R R T T User interactions instrumented, C C analyzed and compared 1.2% of users with a Page 2.8% of users with a Page View clicked on Signup View clicked on Signup Is the observed difference statistically significant? Figure courtesy of Seth Elliot from his SASQAG (Seattle Area Software Quality Assurance Group) April YES 2011 Talk Testing in Production - Your Key to Engaging Customers Version B is better than Version A 2011-10-10 PNSQC Testing in Production -- Keith Stobie 13 Copies may not be made or distributed for commercial use

  13. Experiments (alternate return) User Frontend Backend Service Requests service service Data Production Data Feed Experiment Service Separate experimental service providing the 2 nd alternate output 2011-10-10 PNSQC Testing in Production -- Keith Stobie 14 Copies may not be made or distributed for commercial use

  14. Experiments (alternate code) Service User Frontend Backend Requests service service Service Data Production Data Feed Experiment Service architected internally to have code paths for different alternate output 2011-10-10 PNSQC Testing in Production -- Keith Stobie 15 Copies may not be made or distributed for commercial use

  15. Experiments (alternate data) Service User Frontend Backend Requests service service Data Production Data Data Feed Experiment Sometimes it is just the data, e.g. different ranking values that are being tried. 2011-10-10 PNSQC Testing in Production -- Keith Stobie 16 Copies may not be made or distributed for commercial use

  16. Shadowing (compare returns) User Frontend Backend Service Requests service service Data Data Feed Production Environment Future Equally Backend Environment good? Service service Production Next Environ Data Data Feed Test 2011-10-10 PNSQC Testing in Production -- Keith Stobie 17 Copies may not be made or distributed for commercial use

  17. Fake Traffic (capacity test) User Frontend Backend Service Requests service service replayed Requests Data Data Feed Production Test Capacity test a single service, or entire offering (via the frontend) 2011-10-10 PNSQC Testing in Production -- Keith Stobie 18 Copies may not be made or distributed for commercial use

  18. From: Greg Veith – Workshop on Performance & Reliability 2010 (WOPR14) Modern Cap Generation Toolset DC1 DC3 Monitoring system Monitoring system Capacity clients Capacity clients VI VI P P Bing Entry point Bing entry point Controller DC…n DC2 Monitoring system Monitoring system Capacity clients Capacity clients VI VI P P Bing entry point Bing Entry point 1. Controller drives each of the clients across any/all DCs 2. Capacity is generated within each datacenter to avoid cross-DC network utilization 2011-10-10 PNSQC Testing in Production -- Keith Stobie 19 3. Controller pulls data from monitoring system auto-throttling based on SLA Copies may not be made or distributed for commercial use 4. 2 -3 engineers required for a typical full scale test

  19. Tracers (data flow) User Frontend Backend Service Requests service service Test Requests Data Data Feed Production Data Feed Test Observe test data as it flows across components and out of the system. 2011-10-10 PNSQC Testing in Production -- Keith Stobie 20 Copies may not be made or distributed for commercial use

  20. Shopping Test Product Product in Feed? Catalog Trace Test Product Product Product Authority Data Product Matching Test Offer Test Offer in Feed? Offers & Reviews Merchant Self matched to Offers Service Products? Portal Aggregator Test Review Offers & Reviews Crawl counts correct? Pipeline Test Review 1. Product search page displays in Feed? product when users queries for it? Production 2. Review search page displays User reviews when users queries for it? Test Serving 3. Product details page for a given product contains matched offer and 2011-10-10 PNSQC Testing in Production -- Keith Stobie 21 review information? Copies may not be made or distributed for commercial use

  21. Fault Injection Loss of Service Loss of Service (or machine or (or machine or … ) … ) Service User Frontend Backend Service Requests service service Data corruption Network latency Data Data Feed Productio Production n Test Test Image from : http://behance.vo.llnwd.net/profiles/78972/projects/114549/789721221731305.jpg 2011-10-10 PNSQC Testing in Production -- Keith Stobie Copies may not be made or distributed for commercial use

  22. Summary Risk of Causing Exposure Data Approach issues Control Control Asserts Medium Optional -- Monitoring Low -- -- Offline Low -- -- Controlled Medium Required Useful Experiment Live Capacity High Useful Required Tracers Medium Useful Useful Fault Injection High Optional Useful 2011-10-10 PNSQC Testing in Production -- Keith Stobie 23 Copies may not be made or distributed for commercial use

  23. Testing in Production 2011-10-10 PNSQC Testing in Production -- Keith Stobie 24 Copies may not be made or distributed for commercial use

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