CAP as a web application stress test tool

Keywords:

Stress test, stand-alone server, rule wizard, performance

The context:

A company has developed a new web application that works really well on the local network, but customers are complaining that the performance over the internet from a smartphone is unbearable. However, testing against a live system was also problematic, yet the test system was not on the internet.

The solution:

Using the CAP forwarding proxy and New Rules Wizard, a simple run-through of the application was performed and recorded. This was used to perform a stress test and the problem area was quickly identified and fixed.

Deployment diagram:

Why CAP:

CAP is capable of interacting with a vast array of data sources, protocols and APIs out of the box. It also has a stress testing framework to facilitate the load of many users, including randomization of data, ramp up times and hot-spot reporting.

The story:

Complaints from users that your site is very slow from mobile devices is never pleasant. But it gets more unnerving when you can’t replicate the problem. In this present scenario, the culprit was not so much the site itself as the bandwidth that it consumed.

However, getting visibility of what is consuming bandwidth can be tricky and even then, most developers are focussed on download data (images, Javascript and so on), rather than what the user might be sending.

So a simple record of a mobile interaction was performed on the local network and with some simple tweaks to randomize user names put in place, 50 concurrent users where directed at the test site to determine where a bottle neck may exist.

Normally, small bandwidth issues on a LAN will be hard to spot, but using the CAP performance hot-spot diagrams, the culprit was quickly found. It focussed on a single POST operation that took just a few more milliseconds that it should. Upon further investigation, it turned out that posting 600KB of terms and conditions in a read-only text area field every time an order is placed is a bad idea – and a quick HTML change solved the issue and restored performance to levels that users expected.

Rules blocks and components used:

Stress Testing Rules

New Rules Wizard

Last updated