Expect the Unexpected Guest When Load Testing

August 11, 2015
1

Most of the people who visit your home are invited guests. You know which foods they like and probably don’t have to tidy too much if they’re relatives or close friends. Basically, you know how they’ll behave and can plan accordingly.

If a website is like a home, then you really don’t know what to expect when unfamiliar guests arrive. But that doesn’t mean you shouldn’t plan for their arrival, right? Yet, most load tests are conducted only with familiar guests in mind. A load test for an e-commerce website, for example, usually prepares for the typical paths a shopper follows – log-in, search, shopping cart, payment – but fails to consider strangers, who still make up a big chunk of your traffic.

In this blog – the fifth in a series about load testing – we’ll look at what to expect with unexpected guests. Your website, your home for business, will run a lot smoother if you’re prepared.

It’s fair to say that familiar guests comprise about 75 percent of your traffic. That means you still need to account for another 25 percent of traffic when load testing. Yet, this crowd is often overlooked during testing, none maybe more so than bought traffic. Some companies buy “visitors” to increase clicks and revenue, but these guests will behave differently than users who visit with a specific purpose so you need to plan accordingly.

I once worked on a website that listed local service workers, including carpenters and plumbers. It was a directory service, and one of the site’s key features was that small cities each had a distinct page listing local services. The site was built so that every single page was accessible through every city. Search engines would hit those cities, and then every type of service and then every professional listed for each service. But that was many more pages than a typical, familiar guest would click on, and that behavior eventually brought down the site. The service had too many pages cached and ran out of room.

So even though the site was built in a way that these types of visits could occur, it nonetheless wasn’t prepared for them. Keep that in mind when load testing. The random behavior of atypical visitors, which include spidering search engines, is something you need to consider.

Another unknown visitor you should be ready for is the one who makes a lot of noise. It’s the one who shows up on the security side, either through innocent decisions or malicious behavior. That means you need to prepare for many types of failed log-in attempts by customers attempting, probably unwittingly, to get into a Drupal site as if it were a WordPress site, as well as the people outright trying to attack Java services.

This type of “noise” is not something you can always accurately predict, but writing a load test that has some level of gibberish will help your site prepare for actual behavior in the real world. Again, some of this noise is malicious; some of this noise is people innocently going to old URLs for a previous site. Whatever the intent, it’s hard to predict, but a load test that simply hits random URLs will catch this.

It goes without saying it's a huge advantage to know how Drupal will behave with missing pages or 404 errors ahead of a site launch – just as it’s best to clean the house before your in-laws stop by.

Sign-up for our Developer Blog Newsletter

Thanks!

Add comment

By submitting this form, you accept the Mollom privacy policy.