Cloudinary Blog

How Mediavine handled image load in a 50M+ page-views Rails site

by Itai Lahan
 
We are often asked to share our customer stories with the rest of the Cloudinary community. Whether it's for learning about others experiences managing images with Cloudinary, or just to reaffirm Cloudinary's solution - we love to hear your stories and we're happy to share them.
 
Today, we wanted to introduce you to Mediavine Inc., one of the largest online entertainment networks on the web, and how they utilized Cloudinary to solve their image management needs.
 
 

The customer

Mediavine, Inc. owns and operates some of the web's largest entertainment and lifestyle properties. Mediavine's network of sites include:

       TV Fanatic

     
        Movie Fanatic
         
       Food Fanatic
         

 
 
 
 
 
 
 
 
 
Combined, these websites garner a traffic of nearly 50 million page views a month. 
As modern media outlets go, Mediavine's websites are incredibly image rich. 
 

The challenge

Mediavine's sites run on a custom Ruby on Rails CMS hosted on Heroku. Like many other Rails sites, they started off using the Carrierwave and mini_magick gems to handle their image needs. 
 
However, as their page views and image processing needs grew, they quickly ran into performance problems
 
"No matter how much we optimized image uploads - including moving all version processing to background workers - uploading several high resolution files was just not going to be possible through the dyno manifold." Says Eric Hochberger, founder and head of development at Mediavine. "We knew we needed to go directly to our image store, S3. We looked into rolling out our own solutions, such as carrierwave_direct, but they were far too complex after way too many hours of struggling. And they would still require additional image processing!"
 
 
 

The solution

We asked Eric if he could share his experience with Cloudinary: 
 
"With Cloudinary we got direct upload to the cloud working within minutes. But it didn't just stop there. Cloudinary solved our timeout issue, while greatly speeding up our uploading process, thanks to its easy-to-implement javascript upload." Eric said.
 
"Cloudinary did more than that though. It helped us solve problems we had previously never thought were fixable," Eric added. "Scaling animated gifs worked perfectly without any of our previous imagemagick glitches. As for face detection we thought only the geniuses at Facebook could possess?  Yeah. We have it now. Full ITPC data?  Just try getting that out of mini_magick. Now we can pull locations out of images."
 
What about the integration with Cloudinary? "This all came in ridiculously easy fashion. Really, when it comes to any headaches with dealing with images, Cloudinary has solved them all. Its URLs even solve CDN cache busting. Working with Cloudinary's gem and carrierwave implementation has been a programmer's dream."
 

Recommendation

"It's rare when you can outsource a problem and save money but somehow Cloudinary managed to do that." says Eric. "We were able to knock our direct image hosting costs in half from S3/CloudFront, thanks to Cloudinary's generous pricing and optimization. Even better, we were able to significantly reduce Heroku usage, courtesy of seriously reducing worker dynos with outsourcing thumbnail and version generation. Talk about a win-win."
 
"Even if you have a 'working' solution," continues Eric, "we promise Cloudinary will do it better. Don't worry if you have to migrate from an existing system. They even come with code to help you do that. We had our hundreds of thousands of images migrated in less than an hour. And thanks to the fact they support carrierwave, we had minimal code changes."
 
 

Final words

We were very impressed by just how fast Mediavine managed to wrap their heads around the Cloudinary service, migrate their images and complete the full integration. 
 
We are extremely excited to have Mediavine using Cloudinary, and wanted to thank Eric for taking the time and sharing his experience.
 
Cloudinary users - let us know if you want to share your own unique experience using Cloudinary. We'd love to feature your services here and we're sure that all of Cloudinary's customers will find your insights helpful.
 
blog comments powered by Disqus

Recent Blog Posts

How Answers.com manage millions of images

by Orly Bogler
How Answers.com utilizes Cloudinary to manage millions of images

When was the last time you've asked Google about your favorite band, movie star, or personal hobby? I can only assume that one of the first results that came up was from Answers.com. Nearly everyone knows this website, which is on the Quantcast Top 10 most visited sites in the world.

Read more
Control the zoom level with automatic image cropping

Many websites now offer their users the ability to upload images and profile pictures, making it a challenge for web designers to maintain a certain graphic design and style when subsequently displaying these images. The profile pictures may need to be smartly cropped to focus on the faces, with some sites that prefer close-ups of faces and others that prefer including more background when displaying images of people.

Read more
Introducing cloud based service for video management

They say that a picture is worth a thousand words. For modern websites, a video surely takes the visual impact to a whole new level.

Nowadays, people enjoy the amazing capability of shooting videos with smartphone cameras that easily fit in their back pockets and are accessible nearly everywhere. Modern web applications have an opportunity to dramatically increase their visual impact by showcasing these videos online. Between news reports, user shared video snippets, explainer videos and ad campaigns, we see more and more videos appearing daily in our visited websites.

Read more
Automatic and accurate red eye removal with Cloudinary

Red eye often happens due to the use of flash in low light conditions as the light hits the eye very quickly and into the retina. It then bounces off of the back of the eye and emits a red color due to the blood vessels there. Although more professional modern cameras and flashes generally prevent this from happening, red eye may still occur with simpler, smaller cameras (including smartphones). There are various software solutions for red eye removal available on mobile devices and desktops, some of which require manual processing to get good results.

Read more
How to detect and prevent malware infected user uploads

Social networking sites allow users to upload images or other types of files that are immediately available to other users via news feeds or notifications. In some cases, attackers can directly spread infected files, but more commonly, they leverage the viral effect and the fact that users are simply unaware that their files are infected through sharing and collaborating with others. As a site owner or application developer, it is your responsibility to protect users and prevent these situations from occurring. Fortunately, Cloudinary makes this easier with its Metascan add-on.

Read more