Performance can be a touchy subject. Not only because nobody wants to admit they have performance issues, but more importantly, because most people don't know if they have performance issues. Stats show that any action taking longer than one second has a negative impact on the people using a website. It doesn't mean you'll lose them, but after that one second, there is a measurable decline. If you get over five seconds, it starts to become a big problem. You will get to a point where people assume the page is broken, or not loading or something, and they'll go somewhere else.
There is a bit of leeway with commerce sites, because people do expect checkouts and carts to take a little longer. They have more patience for that than they do for browsing catalogs or reading blogs. But if you can improve performance, you can boost your overall odds of success.
You need to know how fast your website loads at different points in time—maybe it's really fast in the morning, but in the evening when everyone's home doing their online shopping, it slows right down. Maybe it's great on weekends but lousy on weekdays. When are you hitting over a certain threshold (three seconds, five seconds, whatever)? And how often do you test that? You need to know these metrics.
Plus, what happens if you get three times as much traffic (like if you're having a big sale)? You need to do performance testing and load testing to be prepared for that. Does response time go to 30 seconds? Does it become frustratingly slow, or does it completely crash? This can cost you customers and, obviously, lower your bottom line.
If you've had similar events before, you might be able to judge by past performance. But you should do performance testing and simulate the increased traffic you would get (hit a variety of pages, add items to carts, calculate taxes, etc). That's not perfect, because it's not necessarily the same as the way users will browse, but at least it'll give you something. And you can keep the tests and improve on them for the next round.
How to avoid disaster
Go big. If you're expecting a 200 percent jump in traffic, don't just test at 200 percent. Test it at 300 or 400 percent. You want quite a bit of leeway in case you get an exceptionally large amount of traffic or if your tests weren't quite right.
Eliminate areas of concern. You need to watch for anything that is really close to going poorly. You can have certain thresholds where it goes from fine to broken really quickly. If you use up all your memory, for instance, and now it has to use the hard drive, you'll go from everything's OK to everything's garbage. So you don't want to be at 98 percent, because your tests will run fine, but then you hit the tipping point and everything goes bust. That means you need to test until you blow it up so you know where your failure points are.
Test on something closely resembling live. If you test on a dev server or a staging server that is significantly different, those numbers aren't that valid. That does mean spinning up a whole production environment to do your testing, but maybe you spin it up for a day and then turn it back off. But at least you'll sleep better at night, knowing you're site can, and will, perform during those busy times.
TL;DR: You should know what your performance numbers are so that things can't catch you unaware.
More from Acro Media
- High Five video: How to Ensure Your Website is Stable
- BigPipe Caching — Creating a Better User Experience
- Drupal Commerce 2: Technical Overview
- Learn more about Acro Media
Chat with us
We can help you prepare for peak traffic and make sure that your Drupal Commerce website is performing top-notch. Talk to one of our experts today.