Chapter 6. Distributed Load Testing
Each application has its own unique usage patterns. It can be very difficult to accurately predict these usage patterns. If you are working with an existing system, then you can take a look at log files and analytics data to get a sense of how your application is used. If this is a new system, then you can create scenarios based on how you expect the application to be used. Generic benchmarking can be of some use, but a test specifically designed for your system will be more useful.
Warning
The example load test in this chapter is intended as an illustrative example that can be helpful when you are writing your own tests. However, writing a test that is customized to your application’s usage patterns can be very difficult. An appropriate test for your system will look very different than the example test in this chapter.
There are many tools available that allow you to create tests
customized for your application. However, when creating a distributed system
it can be difficult to actually generate enough load to push your system to
its maximum capacity. In order to stress test a distributed system, you will
need a distributed load testing tool. Tsung is a distributed load
and stress testing tool that we will use for the example this chapter. We
will be using Tsung on Ubuntu, but these steps can be easily adapted to
other platforms. Tsung can generate GET
and POST
HTTP requests and, as of version
1.2.1, PUT
and DELETE
HTTP requests. Some of Tsung’s ...
Get Scaling CouchDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.