Search code examples
performance-testing

Performance Testing for a Micro service


I am new to performance testing and we are planning to go live to production soon. Our service is written in kotlin and we are using spring boot. I am confused about whether to benchmark Individual APIs or benchmark scenarios where we have multiple APIs like Create, Get, Perform and Finalise (Assume these 4 steps complete one operation).


Solution

  • The load pattern needs to be realistic otherwise your test won't make a lot of sense.

    So the network footprint your load testing tool generates must match the anticipated production one generated either by real users or by upstream systems.

    If a real user goes through all these steps as one transaction - you should design your test to hit all the endpoints sequentially on each iteration of each virtual user. This way you will be able to catch any possible race conditions connected with the concurrency. Also design your workload model to mimic the anticipated real production traffic, i.e. if the endpoints are being invoked by real users using real browsers or mobile devices add realistic think times between operations

    Also it might be a good idea to test the whole integrated system as it acts at the speed of the slowest component.

    More information: Performance Testing Microservices with JMeter