Founded in 2011, BeachMint is a next-generation social commerce company that delivers fashion and lifestyle brands to women who want to discover and experience affordable luxury. BeachMint is parent to brands JewelMint, ShoeMint and StyleMint, which operate on a subscription model and feature BeachMint’s own branded products, designer collaborations, and up-and-coming fashion brands hand-selected by the company’s design mavens. The sites also feature the Collective, a curated market-space that connects talented designers from around the world with BeachMint’s more than three million registered users.
When founders Josh Berman (co-founder of MySpace) and Diego Berdakin decided to launch BeachMint, they knew they wanted to follow a different model, having customers subscribe to their service and adding new collections of goods to their sites each month. To be successful, they would need a cost-effective, flexible infrastructure that would allow them to grow at an unpredictable pace—and to keep costs low. “We knew we would need to ramp up as time went on, and we didn’t want to have to transition from an on-premises or hosted data center to a more flexible cloud solution once we were making lots of transactions,” says John Gaa, Vice President of Engineering at BeachMint. “It would be too risky to switch providers mid-stream, so we decided early on to build on a platform that would enable us to grow.”
When BeachMint first opened, company founders weren’t sure how many online stores it would have. It did know that it would be catering primarily to women who were interested in fashion—and as quickly as the fashion world moves, BeachMint would need to create new stores quickly. “With each new store, we would need to be able to spin up new instances fast,” Gaa says. “In the data center world, that would have taken weeks. With cloud computing, we could be nimble, creating a new store in the time it takes to develop the storefront.”
No matter which cloud provider the company chose, a robust API was essential to the BeachMint team. “We needed a good console, but we also knew the API was very important in terms of developing in the cloud—you want a lot of control in terms of what type of instances you’re running and how many of them you’re running,” Gaa says.
Why Amazon Web Services
BeachMint chose Amazon Web Services (AWS) as its cloud provider because AWS would provide sustainable, low-cost infrastructure during the early days while enabling BeachMint to grow rapidly and at great scale, without having to switch infrastructures. “No one can beat AWS from a development perspective,” Gaa says. “AWS lets us scale up as needed and develop new features and applications quickly. The AWS Cloud was really the only way to go.”
The company showcases new products on its three online stores on the first day of each month, automatically scaling to add more instances of Amazon Elastic Compute Cloud (Amazon EC2), to accommodate big spikes in visitors and sales. BeachMint uses mostly CPU-optimized instances, as its application is heavy on CPI processing for cart operations and business logic for that. Half the company’s sales each month happen in the first week. Between production and test environments, BeachMint uses more than 100 instances of Amazon EC2 during peak periods. BeachMint uses AWS OpsWorks for front-end and back-end servers, Amazon ElastiCache, and Amazon Relational Database Service (Amazon RDS) for MySQL. Feature releases are verified and tested in independent OpsWorks stacks to let BeachMint release each feature as soon as it is ready. This stops a feature from blocking one another if either one fails QA. The company’s architecture is displayed below.
Figure 1. BeachMint Architecture
The company only employs one systems administrator, even though it does approximately $1 million in sales each month. By leveraging AWS OpsWorks, the company can use its limited resources strategically, enabling its QA team to control its test queue and ensure code fidelity. Using AWS OpsWorks helps BeachMint deploy and create multiple environments so that the company can test out different features without having to create a new technology stack for each feature. “Using OpsWorks lets us stay organized—it lets me look at my QA environment and quickly figure out what versions of code everything is and what our database is pointing to,” Gaa says.
It’s an improvement over the company’s former system. “Using OpsWorks gives us the confidence to release every day,” Gaa says. The company unit-tests both the front end and the back end before releases, using AWS OpsWorks in combination with Jenkins, an extendable open-source continuous integration server, to ensure that the environments are consistent. Using the AWS OpsWorks API, the application makes API calls to separate environments, then Jenkins pairs the environment with a specific version of code. If the build passes muster, Jenkins changes the custom settings of that stack to the right version of the code, so that the stack will be updated and the QA team can test against that version. Once the QA team approves the changes, the new code is deployed to the staging environment to ensure that once it goes live, the code won’t disrupt the production environment.
BeachMint uses Amazon Redshift to drive a full understanding of customer behavior on its sites—how customers act when they’re about to buy a product, but more importantly, what happens when BeachMint loses a sale, otherwise known as a business fail. The company processes 1 Gb of access logs each day with Amazon Redshift, mining the data for identifying errors or bottlenecks in BeachMint’s application that could lead to abandoned transactions. “We want to be able to track everything the user does using access logs and the calls against our API,” Gaa says. “We want to see if the customer clicked on a product or hovered on it. And eventually, we will track the funnel of the customer’s behavior. Let’s say a customer starts looking at an editorial page—what behavior does that lead to? We’ll be able to tell, thanks to Redshift.”
Being able to use Amazon Redshift in this way frees BeachMint from having to put pixel trackers on individual pages, a solution that’s cumbersome and prone to errors. “If you’re putting pixel parsers on your pages, that assumes you know what you want to track. With Redshift, we don’t need to know that—we’re going to find out what the activities are by looking at the log,” Gaa says. “We want to be able to look back in time and determine what customers were doing. Is there a relationship between a specific product, or registration flow, or log-in path that affected our sales? Before we started using Redshift, we didn’t have any visibility into that.”
With half of BeachMint’s sales occurring in the first week of each month, using AWS helps the company handle big surges in user visits and transactions without making big investments in hardware. The company added more than a million users in its first year alone, and AWS has helped meet the demand.
The company has also been able to save about $200,000 a year in operating expenses, not to mention being able to focus on innovation rather than infrastructure. To control costs, the company is using time-based instance scaling and Amazon EC2 Reserved Instances. BeachMint schedules lots of instances in the mornings, when its marketing team sends out email blasts, then spins those down when they’re no longer needed.
BeachMint reduced time to market by automating its continuous integration process, which enables the company to test new ideas quickly without having to worry about hardware or capacity. “It’s important to have the right environment to test innovations,” Gaa says. “There’s no queueing up to test a feature. We have to be able to build this infrastructure multiple times a day, consistently and reliably, and using OpsWorks lets us run our tests in a consistent and identical manner,” Gaa says. The company can also release updates multiple times a day, rather than once or twice a week.