Introduction

We are in the midst of an eCommerce-driven revolution in retail. Prior to the mid-1990s, eCommerce didn’t exist. Today, business-to-consumer (B2C) eCommerce is a $1 trillion per year business worldwide,[2] directly accounting for 6.5% of total global retail sales.[3] Over 50%[4] of retail sales in the United States are now influenced by eCommerce. Emerging markets like Brazil, Russia, India, and China offer near limitless growth potential.

Note

For the purposes of this book, eCommerce is defined as any commercial transaction facilitated between two parties using the Internet. This book will be most useful to those running $100 million/year businesses selling physical goods and services over the Internet to end consumers, though the principles will be applicable to all forms of eCommerce.

eCommerce Deployment Architecture: Frozen in Time

In addition to becoming increasingly important, eCommerce is a fairly unique use case within information technology (IT). It’s perhaps the most visible application a retailer has, either influencing or directly contributing around half of revenue.[5] Failures lead to front page news, disclosures in earnings calls, reduction in stock price, and firings. Most applications are simply not that important—if payroll is processed five hours late, nobody cares. All customer touchpoints are increasingly likely to be facilitated by eCommerce, as point-of-sale systems are being replaced with tablets that connect to a single eCommerce platform. An outage now is the equivalent of barring customers from entering all physical stores.

Due to increasing competition and the maturity of offerings, customers are increasingly fickle about performance. They expect response times to be instant. The New York Times recently said: “The old two-second guideline has long been surpassed on the racetrack of Web expectations.”[6] Going on further to say: “Two hundred fifty milliseconds, either slower or faster, is close to the magic number now for competitive advantage on the Web.” Amazon.com saw a 1% increase in revenue for every 100 milliseconds of response time improvement.[7] In today’s world, milliseconds matter.

Availability and performance are becoming increasingly difficult to provide as traffic has become more prone to rapid spikes due to an increasing reliance on promotions and marketing-driven events. We’ll discuss this more later but it’s not uncommon to see spikes in traffic that are one or two orders of magnitude above steady state. Social media-based marketing can lead to campaigns going viral. From an IT administrator’s standpoint, the traffic can come so quickly that it looks like a distributed denial of service attack, when in reality it’s likely to be a few million kids hitting refresh on their pages in anticipation of the release of the latest hot basketball shoe.

While eCommerce has been maturing over the past two decades, the deployment architecture looks largely as it did in in the beginning—mostly static environments fronted by web servers deployed out of a single data center. Many simply guess at what their peaks will be and then multiply that number by five for safety. Hardware is statically deployed, idle most of the year. It’s been done this way for three reasons:

  1. IT administrators fear losing their jobs due to outages. It’s simply less risky to throw hardware at problems.
  2. For a while, eCommerce deployments were small enough that the hardware cost was negligible.
  3. There hasn’t been a good alternative to the static approach—the cloud in its present form didn’t exist until very recently, and it’s matured only recently.

The current approach to eCommerce deployment architecture is not scalable. The rise in traffic has ballooned environments from dozens to hundreds or even thousands of servers. Given today’s extremely competitive business climate, it’s not feasible to have hundreds or thousands of servers sit idle for all but a few hours out of the year. It’s also increasingly difficult to predict traffic. Most important, and central to this book, is that cloud computing has matured to the point where it can be used for eCommerce.

What Is Cloud?

Cloud is one of those ineffable terms that has been redefined to encompass everything, yet means nothing. For the purposes of this book, cloud is best characterized by three adjectives: elastic, on demand, and metered. Let’s look at each one of these adjectives in greater detail.

Elastic
To be considered cloud, you must be able to increase or decrease a given resource either automatically or on demand using self-service user interfaces or APIs. A resource can include anything you have in your data center today—from commoditized hardware running Linux (Infrastructure-as-a-Service), to application servers (Platform-as-a-Service), up to applications (Software-as-a-Service). The “what” doesn’t matter all that much; it’s the fact that you can provision new resources.
On Demand
Seeing as “elastic” is the first word used to describe cloud, you must be able to provision a resource precisely when you need it and release it when you don’t.
Metered
You should pay only for what you use. This has enormous implications as the costs directly reflect usage and can therefore be substantially lower.

When the term cloud is used in this book, it generally refers to public Infrastructure-as-a-Service. We’ll spend Chapter 3 describing cloud in more detail.

Why Is Cloud a Fit for eCommerce?

Cloud is a natural fit for eCommerce because you can provision and pay for resources when you actually need them instead of building enormous static environments scaled for peaks. The goal is to provision automatically, which we’ll discuss in Chapter 4. Without cloud, environments are statically built and scaled for peak load. It doesn’t make sense when you can use a cloud. The problem of underutilization is even worse for pre-production environments, many of which are built to some scale of production yet sit even more idle than production. Most deployments have approximately the following environments:

  • Two production environments (each capable of handling 500% of the production traffic)
  • Three staging environments (each being 50% of production)
  • Three QA environments (each being 25% of production)
  • Three or more development environments (each being 10% of production)

The staging environments are likely to be used for some form of automated testing about once a week or so. QA environments are likely to be used by a handful of QA testers. But that’s it. If you look at the average CPU usage of all these pre-production environments, it’s likely to be less than 1% for any given week yet these environments consume the equivalent of multiple production environments’ worth of hardware. The situation is slightly better with production but not much.

In addition to being wasteful, building out and maintaining these environments is likely not your core competency as an organization and is likely distracting you from what you do best—whether that’s selling the latest iPhone or selling diapers. Let the few major cloud vendors hire the right talent to build infrastructure. Cloud makes so much sense for eCommerce that its proper use can provide you with serious competitive differentiation while lowering costs. Let’s explore how eCommerce and retail are changing.



[2] Amy Dusto, “Global e-commerce Tops $1 Trillion in 2012,” http://bit.ly/MrUzqB (5 February 2013).

[3] eCommerce Disruption: A Global Theme. Transforming Traditional Retail. Morgan Stanley, January 6 2013.

[4] Rigby, Darrell, et al. “Omnichannel Retailing: Digital Disruption and Retailer Opportunities,” Bain Retail Holiday Newsletter (9 November 2012), http://bit.ly/1k7ypJ5.

[6] Steve Lohr, “For Impatient Web Users, an Eye Blink Is Just Too Long to Wait,” New York Times (2012), http://nyti.ms/1esukXm

[7] Greg Linden, “Make Data Useful,” Amazon.com and Findory, http://bit.ly/1k7ypZw (PowerPoint file download).

Get eCommerce in the Cloud now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.