Egress to $0
David Liu, Founder & CEO, Musify
“I would have switched directly from Amazon S3 to Backblaze sooner had I known that Backblaze B2 would fit so easily into my tech stack.”
Like many entrepreneurs, David Liu, Founder of music streaming app Musify, initially built his app on AWS using Amazon S3 for storage. As Musify grew and evolved, so did his tech stack. Liu migrated from AWS to the Google Cloud ecosystem, but managing storage and transfer costs grew increasingly difficult for the startup founder.
With Cloudflare as his CDN provider, Liu migrated his media, image, and text files to Backblaze B2 Cloud Storage. To make the process fast and efficient, he wrote a custom script that transferred new files automatically while he worked on migrating Musify’s existing data set. He was able to easily migrate 600 TB of data to Backblaze with no interruption to users.
Thanks to the Backblaze and Cloudflare partnership, Liu is now egressing 1 PB of data per month at zero cost, and he reduced his overall cloud spend by 70%. Liu now has greater control over his infrastructure budget as his app grows, enabling him to reinvest in expanding the Musify platform and business.
All images provided by Musify
Based in Japan, Musify is a music streaming service that provides access to over 50 million songs and podcasts from local and global artists. Users discover music through tailored recommendations or by viewing the latest tracks, charts, and playlists. Independent artists can upload their own work to the platform and reach a larger fan base. Available on desktop, mobile, tablet, and TV, Musify allows users to continue to enjoy their playlists even while offline.
The entrepreneur’s path is rarely straightforward. Twists and turns along the way can lead to exciting new opportunities that were unforeseen, or even unimaginable, when the journey began. This was the case for David Liu, founder of the Japan-based music streaming service, Musify. “I always wanted to be a performer,” Liu said, “like a singer, dancer, or actor. But I didn’t have talent. The next best thing I could do was to create a platform that helps young people who are a lot more talented than me be successful.”
Instead of the big screen, Liu found his calling behind the small screen as an app developer. In 2016, with experience working for industry giants like Uber, Apple, and Microsoft, as well as building and testing his own apps, he began exploring one of his favorite digital experiences: music streaming. Initially, he considered Musify to be a hobby project, but as the app’s popularity grew, Liu saw that unforeseen opportunity staring right at him—and he followed its lead.
In 2018, as month-over-month growth accelerated, Liu made Musify his full time job. Much of that growth has come organically from word of mouth or app store searches. “It’s been a rollercoaster ride,” said Liu. “Now, we’re at about 100,000 active daily users who spend an average of eight hours per month on our app, and we’re looking to expand to new markets like Europe and Latin America.” Musify’s rapid growth, however, depended on a tech stack that enabled both development speed and seamless scale.
A Backstage Pass: Inside the Musify Tech Stack
During development, Liu looked to Spotify as his north star. “It’s probably the best music streaming service out there,” he said, “so I’ve developed my app and business model in a similar way.” Musify maintains licenses with major global record labels and partners with other content providers, and the platform also allows independent artists and podcast creators to upload their work. Although Musify is available in both English and Japanese, about 70% of users prefer the Japanese UI.
Like many startups, Musify’s initial tech stack was built on AWS using Amazon S3 for storing media, image, and text files, and MongoDB for data. After a year and a half, Liu decided to follow Spotify’s lead and move his stack to the Google Cloud ecosystem to accelerate development. “I’m trying to learn from the best and catch up to where they are,” he said. The move also fit with his development approach. He, of course, didn’t have the capital of a publicly traded company like Spotify, so as a nimble startup founder, he leaned on resourcefulness to succeed. He noted, “I prefer to not reinvent the wheel and use off-the-shelf solutions whenever possible.”
At that time, Liu migrated all files and data to Google’s Firestore, a NoSQL document database with real time capabilities. He also moved his app’s business logic from a Node.js app layer to Cloud Functions and Cloud Runs. This allows him to simply write a function based on a user event, such as saving a song or creating a playlist, and let Google handle most of the deployment and scaling. Liu added BigQuery for data analytics that feeds back into Musify’s music recommendation service. Continuing to learn from Spotify, he’s building out his event-driven architecture to better scale the feature.
Backblaze + Cloudflare: A Two-part Harmony
A few months after migrating, Liu took stock of his second-generation stack. Everything looked good from a technology perspective, but what about the business side? Like most founders, optimizing for growth was priority number one, but snowballing cloud infrastructure expenses stood in the way. Liu sought to tackle this head-on.
“As more and more people used Musify,” said Liu, “it was getting a lot more expensive to pay for both storage costs and data transfer [egress] costs.” He decided to move his content delivery network (CDN) service from Google to Cloudflare, which helped him significantly reduce some CDN and egress costs. “This was great,” he said, “but I needed to save even more.” At least 70% to 80% of Musify’s cloud costs were still coming from data storage and transfer.
Liu discovered that Cloudflare had close partnerships with storage providers through the Bandwidth Alliance that would eliminate egress costs altogether. He spoke with users of a few Bandwidth Alliance partners. After narrowing his shortlist to two, he found that Backblaze B2 was more stable and performant, which “speaks to Backblaze’s engineering excellence,” he noted. Liu also found a kindred spirit in Backblaze’s bootstrapped startup culture. “I like working with Backblaze because we think alike. In the early startup stage, we both bootstrapped to build a great product rather than funding rounds,” he said.
Like most founders, optimizing for growth was priority number one, but snowballing cloud infrastructure expenses stood in the way. Liu sought to tackle this head-on.
Migrating to Backblaze Without Skipping a Beat
“I’m very happy overall with the migration process and outcome. Had I known earlier that Backblaze B2 would fit so easily into my tech stack, I would have switched directly from Amazon S3 to Backblaze and saved myself the trouble of migrating twice.”
David Liu, Founder & CEO, Musify
Once Liu made the decision to go with Backblaze B2, it became his number one priority to get it done. Liu spent half of his time on setup, error checking, and clean up, and the other half on transferring 600 TB of data to Backblaze B2 using 10 VMs running concurrently. Liu said, “It also gave me the opportunity to do some file structure optimization and troubleshooting, so that my new storage environment would be as clean as possible.” Part of that optimization included splitting songs, lyrics, and images into three different buckets, which sped up the migration and set up his storage architecture for next-level growth. Even with the added troubleshooting, the migration was still faster than his first migration from Amazon S3 to Google Cloud.
To make the process fast and efficient, Liu wrote a custom script that automates the transfer of new files via Google Cloud Storage Trigger, including edge cases and retry logic. He implemented his script on Musify’s iOS and Android apps, as well as its Google Cloud back end, and used the Backblaze B2 Native API to connect to his new storage environment. He then took a snapshot of the Google Cloud storage file list.
From that point forward, whenever a user uploaded a new file, the script would trigger a function to automatically copy the new file to Backblaze B2. This meant that Liu only had to focus on transferring the static list of existing files, and he could begin to delete the old files on Firebase. As soon as he’d completed the migration, he switched the production traffic to Backblaze B2. He noted, “I’m very happy overall with the migration process and outcome. “I would have switched directly from Amazon S3 to Backblaze sooner had I known that Backblaze B2 would fit so easily into my tech stack.”
Scalable, Performant Storage Lets the Band Play On
Liu has now shut down about 95% of his previous storage on Google Cloud. He keeps the last bit open for users who are still on the old version of the app. Regardless, his trigger script continues to transfer those few new files automatically to Backblaze B2.
Today, Musify is egressing out about 1 PB of data per month—all with zero data transfer costs as a result of the Bandwidth Alliance. Due to its robust cache rate, 90% of the transfer happens at the Cloudflare layer, which helps to keep performance optimal regardless of the file or user location.
For Liu and Musify, the cost savings have been huge. This has helped him look towards expanding his app and business with confidence. “With Backblaze, I’ve saved about 70% in cloud costs, and I can reinvest that savings into the business,” he said.
Liu now has more freedom to hire developers and designers to help him expand his vision for Musify. In the near future, he wants to build more collaborative user experiences and enable artists to sell or auction off their work as NFTs. One day, he may even start his own record label and operate recording studios, bringing his journey from aspiring artist to creative app developer full circle. Now that his storage infrastructure is built to scale, Liu is better equipped to take advantage of any new opportunities that may come his way.
“With Backblaze, I’ve saved about 70% in cloud costs, and I can reinvest that savings into the business.”
David Liu, Founder & CEO, Musify
Cloudflare provides developers with a worldwide content delivery network and edge IT security to scale applications globally, serving data from 200 cities in over 100 countries.
Backblaze B2 Cloud Storage is purpose-built for ease, instant access to files and data, and infinite scalability. It seamlessly supports workflows via hundreds of third-party software integrations, or through direct APIs and CLIs. At only $5/TB of object storage per month (a fraction of the cost of the largest solutions), Backblaze B2 is priced so users don’t have to choose between what matters and what doesn’t when it comes to backup, archive, data organization, workflow streamlining, and more.