Using a traditional relational database causes bottlenecks and is costly to scale. With so much data to handle, Shutterfly needed a more efficient way of storing and analyzing it. That’s why the company decided to adopt a document database approach.
“There are quite a few things that come to mind when you compare relational and NoSQL databases,” explained Oleg Joukov, Principal Database Engineer, Shutterfly. “Two of the main features of MongoDB are its flexibility with schema and its ability to scale horizontally.”
MongoDB’s document model lets developers store data in the way it appears in their heads as opposed to trying to normalize it into tables. NoSQL databases come in a variety of types based on their data model. They provide flexible schemas and scale easily with large amounts of data and high user loads.
“With a document database such as MongoDB, you build your data first and, as your application matures, you have your queries that you want to use on the database, so you build your database to feed those queries,” added Joukov. “Whereas in the relational database world, you build your schema, then you build your queries based on the schema, but you're restricted to how your schema is set up, and there is no fast, easy, or cost-effective way to change that.”
Oleg Joukov, Principal Database Engineer, Shutterfly
Oleg Joukov, Principal Database Engineer, Shutterfly
“We had a datacenter with multiple five-node datasets, from 1GB to 10TB in uncompressed data size. We simply created a similar structure in Atlas and moved the data using MongoDB migration tools,” said Joukov.
Shutterfly used MongoDB’s Mongomirror tool to migrate data quickly and securely. Mongomirror connected to the existing database and synchronized it with a cluster running in Atlas, all while Shutterfly’s applications continued to function normally. “We switched over to Atlas in minutes, migrating our multi-terabyte dataset with minimal downtime," he added.
Oleg Joukov, Principal Database Engineer, Shutterfly
Shutterfly customers now enjoy instant, secure access to their photos and projects while Shutterfly enjoys a scalable, cost-effective developer data platform solution.
Shutterfly is taking advantage of MongoDB’s scaling flexibility to effortlessly increase the capacity of Atlas clusters during peak season and then reduce it back when usage slows down again. As a result, Joukov and his team no longer need to worry about coping with seasonal demand. That enables them to focus resources on more strategic tasks, while delivering cost savings up to 20% over their previous data infrastructure.
Atlas also helps Shutterfly launch new services much more quickly. “We can spin up new environments quickly if there is a new project coming up that requires more resources,” said Joukov. “If we want to clone our environment, in the past it was all manual processes. Nowadays, with Atlas, it is very easy and saves lots of effort and time.”
Oleg Joukov, Principal Database Engineer, Shutterfly
MongoDB is also helping future-proof the business by enabling a potential multi-cloud strategy, using different providers.
“One of our future projects is using multi-tenant environments to provide services to different partners,” concluded Joukov. “MongoDB Atlas is engineered to run on multiple cloud providers, so we can fulfill that requirement easily.”
Oleg Joukov, Principal Database Engineer, Shutterfly