Uncategorized

How we hosted a big sale on Magento without a hitch

During an online sale that includes promotion to a list, brands worry about downtime due to “unexpected high load”. We believe that while every system has a rated limit, there can be flexibility added to your infrastructure. With some planning, including autoscale and tuning, a successful sale event can be a very likely outcome. See how we handled one such sale without a hitch.

In our experience promotions via SMS generates very high peaks. In this article we will show our recent experience with a sale day that generated a peak of 30 hits per second to Magento.

The sale

On Saturday 21st March, 2020 one of our customers had a sale event. The merchant – a fashion retail brand – is an omni channel retailer in India with about 145 stores across 45 cities. There have been previous sale events, but this one was different as most stores were closed due to the corona virus measures in place. This meant that more customers were likely to shop online than visit the store.

The sale was promoted via sms and email. The SMS list was about 1 million. Promotional messages were sent in batches of 200k every half hour. Marketing was to start at 10 AM local time.

Monitoring the website

We monitor the nginx log file, analyze and display information on our dashboard. A key component of our dashboard is the plot of number of hits / minute (we count only php hits, static hits like css, js and images are excluded). We also calculate avg response time per minute as well as standard deviation per minute. Both of these have a unit of seconds. We also have alerts setup for many parameters including slowdown and a 5xx error response.

The graph below is for a 24 hour period, including the sale time, which lasted about 5 hours with the effect keeping the site more busy than usual afterwards. Note these are server logs graphs – they look quite different from google analytics!

The traffic & response

The graph gives as an idea of the traffic to the website. The turquoise line is hits per minute served by php.

  • Traffic peaked a about 2000 hits per minute – about 30 hits per second.
  • 3476 items were added to cart during the sale.
  • Average server response was mostly below 1 second.
  • There were 3 errors – all of them related to checkout function (“This payment method is not available”)

Mysql query cache and response time

The store is a Magento 1 website. Just as the traffic / hits to the website started peaking, we got a slow alert – represented by the large black line close to the first traffic peak around 10.45 am in the previous figure. Our prior experience with the website showed that the mysql query cache plays a role in the site performance. Before the sale started, mysql query cache was turned off. On seeing the slowdown alert, we turned on the mysql query cache and saw an immediate improvement in performance. Both avg response per minute and standard deviation per minute improved – for some time.

However, standard deviation – higher number indicates some visitors faced slower response to the website than others – deteriorated with time. After the sale (10pm local time), mysql query cache was turned off – resulting in improved standard deviation, but slightly worse avg response time.

AWS autoscale

The following graph plots AWS autoscale instances over the same 24 hour period. A time based minimum 5 instances was planned during the sale from 9.15 AM to 7.30PM. At the peak 7 instances were required – our autoscale policy adds 2 instances and removes 1 at a time.

luroConnect Architecture for AWS and controls

Our standard scalable architecture uses nginx as a load balancer. The communication between the load balancer to php servers is using fcgi – individual php servers do not have nginx. A NFS server is used to share folders that need sharing – media and var folders in Magento 1. Magento cache and sessions are served from redis. Code is also shared using nfs.

A custom lambda function communicates between autoscale lifecycle hooks and the nginx load balancer adding and remove instances as the AWS autoscale policy decides.

Our cache controls including the ability to turn on and off mysql cache, resize memory allocated to redis cache, resize memory allocated to php-fpm opcache.

Interested in knowing about the advanced architecture of luroConnect?

Fill the form below and we will contact you.


My company owns the Magento site
Yes, I am a developer
I represent a Magento Agency

Meet Magento India 2020

luroConnect is a bronze sponsor at Meet Magento India 2020

Look out for our invitations and announcements closer to the date of the event.

In the meanwhile, you can setup a time for a demo.

We can analyze your site for free

Schedule a call

Not happy with your website performance and want an expert to look at it?

  • We will analyze your site using public information.
  • We will ask you to give us a 1 day web server log file.
  • We will try to identify what steps if any you should take to improve your sites performance goals.

Book Review : The Choice Factory by Richard Shotton

Book Review : The Choice Factory: 25 behavioural biases that influence what we buy
Author : Richard Shotton
Review of podcast interview on Everyone Hates Marketers podcast

Building a brand is tough – what’s worse is that destroying a brand is easy. Standing on the top of the roof and shouting (ok, nationwide TV ads on a major sporting event) does not build a brand with the message you want.

People have biases and they react to the message. Effectively brand is what someone perceives.

The Choice Factory: 25 Behavioral Biases That Influence What We Buy by Richard Shotton is a great book. Richard was recently interviewed on the “Everyone hates Marketers” podcast. Here is a summary of the podcast where they discussed 3 of the 25 biases. The podcast was very interesting overall, but here is the brief as a review of the biases.

Bias 1 : The pratfall effect

A pratfall is defined by Merriam Webster dictionary as “a humiliating mishap or blunder”. It’s the idea that if you admit a weakness or you exhibit a flaw you become more appealing.

Examples : VW. They went out and said, “Ugly is skin deep.” So, admit they’re ugly.
Listerine, the taste you hate twice a day. They admitted they taste awful.
Guinness, good things come to those who wait. They admitted they were slow.

It can be applied to reviews : Northwestern University did a study in 2015 … “As the product review gets better, likelihood to purchase increases until it hits a tipping point. So ,somewhere between 4.2 and 4.4 out of five. And then after that point, if the review gets any better then likelihood to purchase declines.”

Perfection was not trusted. It was seen as too good to be true. Consumers didn’t trust perfection. Most brands do not use this effect and hence people don’t trust brands.

Bias 2 : Confirmation bias.

It’s the idea that people are very good at maintaining their existing point of view. For example, if you dislike a brand and you hear a message from them. Your brain can generate counter argument after counter argument which maintains it’s existing point of view. It just doesn’t agree with the new information.

Research has shown that distraction is a good tactic to move away from confirmation bias.

Example :
“In the late-80s British Airways were struggling with perceptions of quality.

What they didn’t just do is talk about how they had amazing stewards and stewardesses, great big seats. What they did was always accompany their ads with this wonderfully evocative piece of classical music. Now there is no logical argument about quality. Therefore the brain doesn’t come up with a list of counter-arguments.“

Bias 3 : Habit

“what are the moments when people’s habits become destabilized? And therefore as an advertiser you can persuade them. ‘Cause there’s an argument that’s there’s a huge amount of complexity in life.”

People buy brands that they always do. To make them change is not persuasion as they are not even considering the brand.

A tactic discussed is “people’s habits become destabilized just after they undergo a life event. So what I mean by that — a life event is getting married, divorced, retired, moving house.”

During a research conducted by the author “what we found was that on pretty much every life event and every product we looked at people between two and three times more likely to try a new brand in that short window after they had undergone a life event.”

So, as a brand think of the moments or events in your customers’ lives that you can introduce your brand or “putting a disproportionate influence on people when they are entering your category” or personalization.

However, he cautions about over personalization “If it tries to target different messages to different people. To begin with, that will look amazing. It will have a great effect but sooner or later we ill overhear those messages and therefore we’ll know that it stands for nothing or that it can stand for many different things. So it’s value is a signal to other people about what we believe in no longer stands.”


If you liked the review or book please post your comments . If you want to see more reviews, let us know on the chat.

luroConnect – Alluring connection to your customers – improves online perception of brands by delivering an Awesome Digital Experience. Our manged hosting service helps with performance, scale and security of your web properties (blog, website, app backend) backed by a 24×7 support.

We can analyze your site for free

Schedule a call

Not happy with your website performance and want an expert to look at it?

  • We will analyze your site using public information.
  • We will ask you to give us a 1 day web server log file.
  • We will try to identify what steps if any you should take to improve your sites performance goals.

5 Questions to ask before selecting a Magento Managed Hosting Provider

5 Questions to ask your Magento Managed Service Provider

  1. Does the managed provider help you with setup of a CDN?
    Content Delivery Networks or CDN is the best way to get a boost of your page load time. A CDN takes away the load on your server by caching commonly used files that do not change frequently. Such files include css, js and image files. For a Magento store, images constitute a large amount of time and bandwidth of a page.
    Large CDNs have an additional advantage of having multiple end points or servers near your customers. This reduces latency and images tend to appear immediately.
    The good news is that CDNs are now a commodity – they are aggressively priced with some large CDNs having unlimited free plans.
    The only catch is that you need to “invalidate” or “purge” cached content from the CDN if you were to change the same file on the live server. Until automated, this procedure can be a burden.
    Your Magento Managed Hosting Provider should provide you with practical and complete options for a real CDNs, including help in configuring your Magento site to use your selection
  2. Does the provider have a disaster recovery plan – not just a backup?
    Backup is as good as the restore process.
    Yes! Just having backup is a essential but not sufficient.
    If your site were to be hit by a disaster, how would you be able to bring up your site on another server? Would all services start as desired?
    Funnily we have seen many magento servers do not come back to full service on a simple reboot, far less a disaster.
    Moreover, backups should be taken “off-site” – not within the same zone or provider you currently have.
    And your Managed Magento Hosting provider should give you a written disaster recovery plan based on different types of scenarios and that you can put into motion if the time arises.
  3. Does your provider regularly evaluate and tune for optimal cache performance?
    Magento site performance is quite often driven by the condition of its various caches. Caches store results in RAM vs either on disk or having to compute the results. As a quick look at the Cache Management page on Magento’s admin panel shows there are many application level caches. In addition, mysql stores query results in a in-memory cache, however requires the cache to be sized and enabled in a configuration file. The php code can be stored in a opcode cache in the php server. This also requires memory allocation and enablement.
    Since no two magento stores are the same, there is no standard configuration. It requires observation and tuning.
    Your Magento Managed Hosting provider should give you information and tune the cache, possibly even advising you with server sizing in the process.
  4. What scalability plan has the provider made for you?
    As hits increase, it may be required for your site to scale. But, how will you even know the time has come?
    In todays world, a slowdown of your Magento site is equivalent of downtime. Consider this – each drop of a second in your load time results in drop of visitors.
    If traffic spurted due to a online or offline ad, how would you know the server capacity needed to handle the spurt? Do you need autoscaling and loadbalancing technologies?
    Your Magento Managed Service provider should be on your side in advising
  5. Do you know the deliverability of your transactional emails?
    An eCommerce site sends many emails – new user registration, password change, order confirmation, abandoned cart. These emails need high rate of deliverability. If emails are directly delivered from the host, there are 2 problems – It is not known which emails are delivered and which are not. amd secondly mail servers are constantly upgrading their needs of the senders ability to send, resulting in increased non deliverabilityMany services are available to handle such emails – Amazon SES, Mandrill, Sendgrid to name a few. Each give a varying level of granularity of reports and pricing plans to support your volume.Most of these services have Magento Plugins, some premium. However, a email plugin will attempt to send the email “inline” – for example the order email is sent while the customer is waiting for the success page. A better solution is to send the email to the local system queue, and let the system process the queue by sending the email to the transaction email provider.

    Your Managed Magento Service provider should be able to configure your server’s email system to use your chosen transaction email provider?