Online Store Migrates to AWS

One of our clients recently migrated their online store from on-premise to Amazon AWS.

This system handles up to 6 million customers on a peak trading day and accounts for £multi-billion revenue each year.

Cloud Costs were higher than expected

Shortly after the system went live, the client realised that the monthly bills for AWS were much higher than expected. Like most e-commerce services, they experience extraordinary peaks, and highly variable demand. The system had been deployed with a fixed amount of AWS capacity for peak so there was significant unused capacity outside of peak periods.

AWS Auto Scaling seemed like the obvious answer, as Auto Scaling would automatically increase the capacity of the e-commerce service during periods of high demand, while lowering during periods of low demand.

However there was nervousness in using auto scaling for the following reasons:

Website demand was highly variable day to day

There were extraordinary peaks in sales, both planned and unplanned

There had been several events in the past where unexpected surges in demand had ocurred due to external events

How can we best Use Auto Scaling to Control Cost?

There are three steps to using Auto Scaling effectively.

1. Understand and forecast your demand profile

This not only includes having an accurate view of peak user numbers, but the shape of the demand profile over time. This allows us to react to rapid changes in demand. With this client, multiple peaks in a single day were common.

The auto scaling was not sufficiently responsive to the sharp increases in demand

Significant over-capacity during periods of low demand

Our testing with a smaller instance configuration demonstrated the right balance between performance and cost. In this configuration we had more more instances as a base, but additional instances could be fired up in a more timely manner. This significantly reduced the capacity/cost footprint, without impacting performance:

3. Implement a continual capacity management process

AWS Auto Scaling cannot be 'set once and forget'. As time goes on a three variables will change:

The demand profile

The efficiency of the software will change with each new release of code

New AWS instances will be released to market

These variables will impact your cloud cost management.

It is therefore critical that a continual capacity management process is put in place to ensure the scaling configuration remains optimal. Without a process, the configuration can quickly become sub-optimal causing costs to climb, and performance to degrade.

Results

Using this approach we helped our client cut production costs by 66%, without impacting the performance of the online store.

The steps were then implemented in the test environments, delivering further cost savings.