Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Performance Testing for DevOps in the Cloud @ C...

Performance Testing for DevOps in the Cloud @ Codemotion 2019 Amsterdam

Slides + EXTRAS! :)
See https://stormforger.com/presentations/2019/performance-testing-devops-cloud-codemotion-amsterdam/ for more information.

Abstract: Performance tests are not only an important instrument for understanding a system and its runtime environment. It is also essential in order to check stability and scalability – non-functional requirements that might be decisive for success. But won't my cloud hosting service scale for me as long as I can afford it? Yes, but… It only operates and scales resources. It won't automatically make your system fast, stable and scalable. This talk shows how such and comparable questions can be clarified with performance tests and how DevOps teams benefit from regular test practise.

Lars Wolff

April 02, 2019
Tweet

More Decks by Lars Wolff

Other Decks in Technology

Transcript

  1. Introduction @larsvegas
 [email protected] My Journey so far • Software engineering

    • Consulting and Agile coaching • Performance Testing • Ship it! • AWS User Group Cologne & AWS Community Days Germany
  2. Performance The ability of a system to execute one task


    within a defined dimension = efficiency of a system
 ↪ 1 server manages 250 rps with p99 500ms.
  3. Scalability capacity 0 1000 2000 3000 4000 resources 5 10

    15 20 25 30 Effectivity by which the capacity can be increased through adding resources
  4. What makes me recognize that I have a performance problem?

    http://www.slideshare.net/jboner/scalability-availability-stability-patterns/15-How_do_I_know_if
  5. What makes me recognize that I have a scaling problem?

    http://www.slideshare.net/jboner/scalability-availability-stability-patterns/15-How_do_I_know_if
  6. “In software engineering,
 performance testing is in general,
 a testing

    practice performed to
 determine how a system performs
 in terms of responsiveness and stability
 under a particular workload.”
 https://en.wikipedia.org/wiki/Software_performance_testing – Wikipedia
  7. " $

  8. Performance Tests • Collection of 
 non-functional test methods •

    Not to be defined with 
 absolute selectivity • Different goals and perspectives Load Testing Stress Testing Spike Testing Soak Testing Endurance Testing Resilience Testing Configuration Testing Scalability Testing
  9. Performance Tests? • Not only for testing releases • Evaluation

    of… • technology, • proof of concepts, • troubleshooting and debugging
  10. Performance Testing Maturity • no performance tests, at all •

    tests if problems occur during production • tests (shortly) before large-scale (sales & marketing) campaigns ) • regular testing ) ) • tests as a regular, integrated DevOps instrument ) ) ) ) )
  11. Challenges • organizational obstacles, e.g. buy-in
 (management & team) •

    testing goal & scope • visibility in your own systems • The right performance test tool for the job
 – (usually) no tooling problem • start!
  12. Steps to Perf Tests™ • bring together the stakeholders +

    development operations QA product management marketing
  13. Steps to Perf Tests™ Kick off for 15 Min
 –

    All Stakeholders Heads Up STATE
 We’ll NOW create a performance testing culture to make sure that we can hold our promise to the business/customer to be fast and available under different amount of usage/users/transactions.
 We so match performance and availability requirements to keep the business save. ASK
 Do you all agree? STATE
 OK, we start with testing a very easy use case to raise a baseline of numbers about performance and availability. This friday, it’ll take a 2 hrs timebox. + development operations QA product management marketing
  14. Steps to Perf Tests™ Test Case • Create a first,

    simple Test Case • Q: Test Data? • Q: How much traffic?
  15. Steps to Perf Tests™ Test Case • Ask Analytics
 for

    the hour of the highest number of users in a week. • Analytics: 
 We have 10.000 visits in this hour. The Users visits flower-list, one flower detail.
 30% check out and payment.
  16. Steps to Perf Tests™ Test Case • Test Environment &


    Load Generator Setup • Since Infrastructure is code:
 Just start your test environment!
  17. Steps to Perf Tests™ Run Test • 20 Minutes •

    Invite ALL stakeholders! • It’s about collaboration
  18. Steps to Perf Tests™ Inspect Report • Response Time? •

    If errors occurred:
 Do you see these in your monitoring, too?
  19. Steps to Perf Tests™ Meet and communicate to stakeholders: •

    ONE Statement like
 We aim for baseline numbers.
 We tested flower-list and flower-detail.
 We created 4x traffic of peak hour.
 We saw 20% of errors.
 But always responded in under 1000ms (p99). • Ask
 Are you happy? • Ask
 Whats’ next? Checkout? + development operations QA product management marketing
  20. Steps to Perf Tests™ Non-functional requirements • No errors! •

    Each request must be faster than 250ms p99th
  21. Steps to Perf Tests™ Automate • Run test runs from

    any pipeline • Run automated checks of
 non-functional requirements
  22. It’s a feedback loop Stakeholder Requirements Definition
 (test scenario) Execution


    (test case) Result Interpretation & Reporting Business Needs
  23. Start creating a Community of practice Special Interest Group since

    performance testing is an orthogonal topic
  24. Defining goals • Defining goals beforehand (why are we doing

    tests?) • Important!
 Always define goals (and requirements) from the specialist side ☝ • A goal can be very simple at first, e.g. “surviving Black Friday well” or “we want to become 20% faster”.
  25. Where to start with testing? • defining System Under Test

    (SUT) • finding the right scope • perimeter/end-to-end tests • components/service tests
  26. System Under Test • testing “from top” (end-to-end) or “sideward”

    against single services • for the compartment side, only integrative tests are interesting • testing single services for the purpose of trouble shooting (technical perspective)
  27. Define requirements • make assumptions for non-functional requirements (NFR) •

    assistance via “baseline” performance tests and performance budgets • simple requirements might be: “deliver sites under 2sec”, “10k checkouts per hour”, … • also here: start simple, learn, improve, repeat! • do sanity checks!
  28. + development operations QA scenarios • bouncing visitor • returning

    customer • walk-in customer • … product management marketing workloads • Black Friday peak hour • average peak hour • 3 hour fire sale • … Who? What?
  29. Testing together • Especially before the first tests: involve all

    the stakeholders! • GO! • Present setup, assumptions and findings • Check or rework scenario sanity • Repeat!
  30. Performance Budget Browser Firewall Load Balancer Webserver App Server Service

    A Service B … FACT-Finder FACT-Finder FACT-Finder MySQL MySQL MySQL ☁ ☁ MySQL MySQL Cache ……
  31. Stress Testing • Tests with increased up to extreme load

    • Understanding system behavior under (over)load • Identify limits and capacities
  32. Scalability Testing • How effective are more resources transformed into

    capacity? • Foundation for capacity planning and cost estimation
  33. Spike Testing • How does the system react during (extreme)

    peak loads? • Are we reacting fast enough? • Occasions: Marketing , Reddit, Hacker News, …, TV shows
  34. Soak Testing • How does the system behave under load

    during a long period of time? • (very) long load test • Are there any longtime effects? Memory leaks?
  35. Configuration Testing • How does the behavior change if the

    configuration modifies? • Series of test executions • Investigate the impact of the environment on your own system
  36. …in the cloud • Types of instances • Auto scaling

    settings • Throughput provisioning • Ideal usage of services?
  37. …and in general… • Hypervisor • Operating system • Web

    & application server • Software configuration • Software dependencies
  38. Availability & Resilience Testing • (Zero-Downtime) deployments under load •

    Changes in infrastructure • Error scenarios • Failover testing • => Chaos engineering