Teespring Uses Amazon S3 Intelligent-Tiering to Cut Monthly Storage Costs by 30%

2019

Teespring is an online platform that lets creators turn unique ideas into custom merchandise—such as t-shirts, mugs, and phone cases—that their fans can buy. “Eight years ago, our founders were frustrated by how hard it was to start a t-shirt campaign to support a social cause. They realized that there had to be a better, lower-risk way to bring physical products to market without having to understand e-commerce storefronts, manufacturing, and customer service,” says James Brady, vice president of engineering for Teespring. “Teespring manages all the tricky stuff in the middle so that anyone with an idea and entrepreneurial spirit can earn a living, create new connections with followers, or raise money for charity using our platform.”

Millions of people bring their design ideas to Teespring, and the company must store data for those users and all the products they create. For a creator who only offers a couple of products, there may be just a handful of files. For a more prolific user, with multiple products and color choices, there can be tens of thousands of high-resolution images. Over time, this resulted in accumulating billions of image files that need to be accessible on demand to Teespring’s manufacturing network. Like many cloud native companies, Teespring addressed the problem by using Amazon Web Services (AWS), specifically storing data on Amazon Simple Storage Service (Amazon S3). “AWS was the clear market leader in cloud technology, so it was the default choice,” says Brady.

start a python tutorial
kr_quotemark

Because of the services AWS provides and the ease with which we can implement them, Teespring has yet to hit a physical limit to what we can accomplish."

James Brady
Vice President of Engineering, Teespring

 

Controlling Costs with Storage Options

As Teespring experienced rapid business growth, the company’s data also grew exponentially—to a petabyte—and continued to increase. Because Teespring engineers were focused on scaling up the service to handle the demand, the data stored in Amazon S3 wasn’t always well organized. “If we had known the scale we would grow to manage, we would have thought very carefully about object naming and metadata tagging,” says Brady. “In those days, though, it was just about figuring out a way to keep up with Teespring’s exploding popularity.” A new storage class, Amazon S3 Intelligent-Tiering, offered an easy path to gain significant savings. Teespring simply moved entire buckets into S3 Intelligent-Tiering, which automatically transitions objects between different storage tiers based on how often those objects are accessed.

However, it was the launch of Amazon S3 Batch Operations that gave Teespring the ability to regain full control of legacy data in Amazon S3. “The issue was that the objects in Amazon S3 didn’t have enough metadata associated with them for us to figure out what storage class they should be in—or whether we even needed them at all,” says Brady. “We were looking for a way to apply our own business rules to Amazon S3 objects at a massive scale”.

The company created a number of rules based on creator and buyer behavior data to define the appropriate storage class for objects. “For example, if a product hadn’t been available for purchase for years, we were comfortable moving its assets to a lower-cost storage class,” says Brady. The company then pulled information from its Amazon Redshift data warehouse to generate Amazon S3 Batch Operations manifest files, which specified exactly which objects could be moved to Amazon S3 Glacier with no impact to the business. Amazon S3 Glacier is a highly secure, durable, and low-cost storage class for data archiving. Customers can reliably store any amount of data at costs that are competitive with or cheaper than on-premises solutions. By using Amazon S3 Glacier and S3 Intelligent-Tiering, Teespring now saves more than 30 percent on its monthly storage costs.

Teespring is now also exploring the use of Amazon S3 Glacier to help with machine learning and AI workloads. Sometimes platform users upload problematic designs, such as files that infringe copyright law or use hate speech. When the company discovers those listings using machine learning algorithms, it disables them so users can neither see nor access them. Instead of deleting those listings, it archives them in Amazon S3 Glacier. The company is building an image library from those files to use as a training set for future machine learning improvements, so Teespring can discover and remove such content faster.

Growing Without Limits

In addition to storage, Teespring takes advantage of other operational improvements using AWS. “Just as Teespring simplified the process for bringing physical products to market, AWS simplified how businesses approach cloud and infrastructure,” says Brady. “Any company should be able to build a world-class website and cloud-based business without knowing anything about infrastructure, buying physical servers, or hiring an operations team. That’s what AWS enables.”

The company recently migrated most of its infrastructure from the Heroku cloud platform to the AWS Cloud and is now using Amazon Elastic Container Service (Amazon ECS), an orchestration service for Docker containers. “Because Amazon ECS is built around Docker, the change in platform was straightforward. I was surprised, in a pleasant way, that we made the switch without any downtime or user impact. Since Amazon ECS is written on an open platform, we had a convenient way to make the switch without the need to rewrite everything,” says Brady.

Teespring also uses AWS Lambda for serverless computing. “AWS Lambda shifts your thinking about your workflow as an engineer. With AWS Lambda, tasks that used to take us 1 to 2 hours, now take 5 minutes. It’s such a large change that it has reshaped the way we work,” says Brady. The use of AWS Lambda allows the company to be more nimble and take planned risks. “We can be more experimental by using AWS Lambda to push updates to our site, knowing that even if something doesn’t work as planned, we can fix it in less than 5 minutes, probably without anyone even noticing.”

Teespring expects AWS to help empower its continued innovation. Brady says, “Since its launch, the scale to which Teespring has grown seems almost incomprehensible. Because of the services AWS provides and the ease with which we can implement them, Teespring has yet to hit a physical limit to what we can accomplish.”

To learn more, visit aws.amazon.com/s3.


About Teespring

Teespring is an online platform that simplifies the creation, production, and sale of custom merchandise. Creators design products through the platform, and Teespring manages online storefronts, order fulfillment, and customer service.

Benefits of AWS

  • Processes billions of files to discern which can be moved to cheaper storage options
  • Builds image library to create training set for machine learning
  • Saves more than 30% in storage costs
  • Migrates cloud infrastructure seamlessly with no downtime or user impact
  • Tasks that used to take 1 to 2 hours now take 5 minutes

AWS Services Used

Amazon S3

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics.

Learn more »

Amazon S3 Glacier

Amazon S3 Glacier and S3 Glacier Deep Archive are a secure, durable, and extremely low-cost Amazon S3 cloud storage classes for data archiving and long-term backup. They are designed to deliver 99.999999999% durability, and provide comprehensive security and compliance capabilities that can help meet even the most stringent regulatory requirements.

Learn more »

Amazon ECS

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, high-performance container orchestration service that supports Docker containers and allows you to easily run and scale containerized applications on AWS. Amazon ECS eliminates the need for you to install and operate your own container orchestration software, manage and scale a cluster of virtual machines, or schedule containers on those virtual machines.

Learn more »

AWS Lambda

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running.

Learn more »


Get Started

Companies of all sizes across all industries are transforming their businesses every day using AWS. Contact our experts and start your own AWS Cloud journey today.