How Raru stayed online during Black Friday

Black Friday took a toll on South Africa’s online retailers, with many suffering downtime or problems with payment processing systems.

Raru was one of the online retailers that kept its site up throughout the day – barring two minutes in the early morning – without needing to switch to a bigger server.

“Raru is a lean start-up and buying millions of rand of stock for a single day adds risk. If our site is down it would take much longer to sell that stock and cash flow is critical,” it said.

It said its site is running on a single mid-range server and a second server is used as a replicated failover backup.

Operating system upgrade

To ensure everything ran optimally for Black Friday, the latest version of Ubuntu Linux, which includes an upgrade to PHP 7, was installed.

This gave Raru a 130% increase in performance under load. The Ubuntu upgrade also came with the latest versions of Nginx and MySQL.

As part of the upgrade, it also rolled out HTTPS across the entire site.

“Customers’ payment and personal details were always protected, and switching the entire site means nobody in the middle can eavesdrop on what they are browsing either.”

Handling the spikes

Raru’s big sales see new products appearing at regular intervals, which causes spikes in traffic at those intervals.

During its second birthday sale, Raru found that the concurrent connections at the spikes were approaching the limits that Nginx could handle on its hardware. To mitigate this it:

  • Switched to HTTP/2. The new protocol reduces the number of connections your browser makes to the server and fetches multiple images and scripts on a single connection.
  • Load balanced to serve images from failover server as load gets bigger.
  • Run more SQL queries from the slave database on the failover server should the need arise.
  • Have the option to switch off images on the deals page in the case of total overload. This is not ideal, but better than downtime.

Some downtime

Raru’s only downtime on the day was between 08:00 and 08:02.

Many people were refreshing the site at the same time, causing the database to update the new prices and deals on the products, which pushed the site beyond the one-minute timeout.

A two-minute timeout would’ve prevented the downtime.

Its customers also experienced problems paying by credit card, but Raru said this wasn’t under its control.

“With the huge volume of transactions countrywide, the company that handles 3D Secure for credit cards couldn’t cope and many people were unable to complete their card payments.”

Raru said it offered alternative payment methods and let clients try their card later after they had secured the items they wanted.

The stats

Raru provided the following statistics from Black Friday:

  • Page views doubled compared to Black Friday 2015.
  • Page views were up 700% compared to an average November day.
  • 100% growth in turnover compared to last Black Friday.
  • Turnover was up 1,100% compared to an average November day.
  • Uptime of 99.8%.
  • Peak of 20,000 concurrent connections.
  • Peak of 6,000 web-server requests per second.
  • Peak CPU usage was 38% for 5 minutes at 8am. Average usage was 18%.

Now read: Best Cyber Monday 2016 tech deals in South Africa

Latest news

Partner Content

Show comments


Share this article
How Raru stayed online during Black Friday