Supermarket Overload

With Corvid-19, grocery stores have seen a huge uplift in traffic to their websites. No one could have expected this scenario. Some may have been more prepared than others. They may have stress and spike tested their systems, so understand the pinch points and know the areas to initially target for improvement.

One leading supermarket appears to be struggling on checkout. Specifically, handling the returned data from the bank authorisation. This ends in multiple errors, leading you to re-authorise the checkout. The fix to this issue could be as simple as increasing the response timeout or wrapping the process into a message queue.

It’s hard to know the specific performance issue each are experiencing but there are common ways to improve performance listed below:-

Scale infrastructure

Any components of the system that reside behind a load balancer could be a quick win allowing more nodes to be added to spread the load across that tier.

Create message queues

A message queue would allow you to send, queue and acknowledge messages. Critically, you would want to configure acknowledgements to ensure that the data was received successfully or the message would be returned back to the queue.

Use a web cache for product images

For static components such as product images, you can add a web cache server. These hold data in memory reducing the need to access the web server for the image.

Throttle traffic

Where segments of the network are overloaded you can throttle the throughput.

Increase the connection pool size

Communication between web and application servers typically use a pool of connections. These pool sizes can be increased reducing the build up of waits.

Increase connections to the database

Databases can handle large number of connections but often the calling application is set to a hard limit. These can be increased which should reduce the wait time on the application side.

Introduce new hardware to handle micro tasks

Move micro tasks to new infrastructure, freeing up resources from other areas of the infrastructure.

Increase timeouts

Look at components that are timing out and see if you can increase the timeout limit.

Reduce logging level

When under stress, writing information to log files can quickly cause a bottleneck. Lowering or disabling logging completely will improve performance.

Reduce number of images per page

This is more drastic but where the site can be simplified, look to remove excessive images. Style-sheets might be a lighter alternative to keep the design of the site similar.

Simplify pages

If pages can be removed from the process such as product suggestions, look to remove these to lower the number of requests to the web server.

Limited number of products returned per page

Limit the number of products returned to a small set and split the full result across multiple pages (only loading these pages on request).

Previous
Previous

Create Data with JMeter

Next
Next

Performance Questions