Seattle's Best Tech Team

Main menu

Post navigation

Serving dynamically resized images at scale using Serverless

At zulily, we take pride in helping our customers discover amazing products at tremendous value. We rely heavily on highly curated images and videos to narrate these stories. These highly curated images, in particular, form the bulk of the content on our site and apps.

Two of our popular events from weekend of Oct 20th 2018

Today, we will talk about how zulily leverages serverless technologies for serving optimized images on the fly on a variety of devices with varying resolutions and screen sizes

In any given month, we serve over 23 billion image requests using our CDN partners. This results in over a Petabyte per month of data transferred to our users around the globe.

We use AWS Simple Storage Service (S3) bucket as the origin for all our images. Our in-house studio and merchandising teams upload rich images using internal tools to S3 buckets. As you can imagine, these images are pretty huge in terms of file size. Downloading and displaying these images as-is would result in sub-optimal experience for our customers and waste of bandwidth.

Architecture

Dynamic image resizing on the fly

Workflow:

Step 1: Full size images are uploaded by zulily studio to s3 using internal tools. We will talk about this in a future blog post

Step 2: Customers visit www.zulily.com in their browsers or open zulily app on their mobile device. zulily web servers return HTML markup which amongst other things contains image tags like the one shown below:

Step 4: The first time a request is made to CDN, there is a cache-miss so the CDN sends the request back to the origin server. zulily s3 bucket is configured as a static website along with the following reroute rule: