Storytel: Turning a new page for global book streaming with a modern microservices architecture

About Storytel

Based in Sweden, Storytel is a rapidly expanding online audiobook and ebook subscription service, currently available in 15 countries.

Industries: Technology
Location: Sweden

Tell us your challenge. We're here to help.

Contact us

Storytel implements Google Cloud to support rapid global expansion, moving to a microservices architecture with Kubernetes Engine for quicker data ingestion and more agile deployment.

Google Cloud results

  • Creates a robust microservices architecture based around Kubernetes Engine, meaning services can function independently
  • Enables quick and easy scaling to ingest thousands of books within hours if necessary
  • Powers analytics with BigQuery and Looker Studio to better understand and communicate in-app customer behavior

Agile pipeline with 30 microservices

Like the film, television, and music industries before it, book publishing is currently being transformed by new models of production and consumption. "With Storytel, by paying a flat-rate monthly fee, our users have unlimited access to our library of audiobooks and ebooks," explains Daniel Bodner, CTO at Storytel. "We have a total of around 200,000 books available, which include English and foreign language books, and as well as streaming, we also publish new books."

"Storytel currently operates in 15 markets, including the Nordic countries, the Netherlands, Poland, Russia, Spain, Iceland, and Italy," explains Daniel. "Our strategy is to educate and build up new markets, transforming them using technology. We currently have more than 760,000 subscribers and are hoping to reach 800,000 soon, as well as expanding into Latin America and Asia."

"Our trigger for change came from the strategy. Continuing with a traditional hosted service wasn't sustainable in view of the growth we were expecting, so we knew we had to move into the cloud. We saw that as an opportunity to transform our architecture."

Daniel Bodner, CTO, Storytel

Because of its ambitious plans for expansion, Storytel's previous hosted services provider was not able to provide the scalability it needed to power its growth. It also wanted to move away from a monolithic architecture towards a more modern microservices infrastructure that would enable its developers to be more agile. Moving into the cloud and on to Google Cloud was the solution.

"Our trigger for change came from the strategy," says Daniel. "Continuing with a traditional hosted service wasn't sustainable in view of the growth we were expecting, so we knew we had to move into the cloud. We saw that as an opportunity to transform our architecture."

Breaking up a monolithic architecture

A monolithic infrastructure with interconnected services requires coordinated updates and maintenance, and can also lead to the entire service crashing if one of the components fails. As part of its preparations for expansion three years ago, Storytel decided to move into the cloud and transform its infrastructure from a monolithic model to make it more robust, simpler to maintain, and easier to scale. "Previously, we had to work in very close contact with our provider, calling or emailing if we needed more servers, which could take up to half a day," says Daniel. "Beyond moving into the cloud, we also wanted to update our stack to make the most of what a microservices infrastructure can offer."

To do that, Storytel moved to a containerized environment based on Google Kubernetes Engine (GKE). "We reworked how we handle all of the data processes we need for Storytel: book data and metadata, image and MP3 files, file conversions," says Daniel. "Now our pipeline is based around 30 microservices."

"After new book files have been ingested into our system, all the metadata and inserts are held in Cloud Datastore so they can be checked before they go live," explains Daniel. "Once everything is approved, it goes into a Cloud SQL database, ready for the end user. We also use Cloud Pub/Sub and Cloud Functions, and Google Stackdriver for logging and monitoring."

"One of the reasons we chose Google Cloud was the way the whole ecosystem works together," Daniel says. "We use BigQuery for analytics: to calculate royalty payments on every book streamed and also to analyze the tracking data on app events through Firebase and gain insights. One use case is understanding which book lists people have been looking at to add books to their bookshelf. The data science team also uses Looker Studio to produce analytics reports for our management teams. For example, we can easily visualize which books are the most popular using simple dashboards."

"Thanks to Google Kubernetes Engine, we're able to parallelize the ingestion process, so we can ingest a large backlog of material in a short time. If we wanted to, we could spin up a thousand nodes and it would take only a couple of hours to ingest a thousand books."

Daniel Bodner, CTO, Storytel

Implementing Kubernetes Engine

Being able to scale up rapidly was a key criterion for the new infrastructure. "If we have a new publisher come on board, we might suddenly have a thousand new books to upload to the platform," says Daniel. "That might previously have taken several days. Thanks to Google Kubernetes Engine, we're able to parallelize the ingestion process, so we can ingest a large backlog of material in a short time," he says. "If we wanted to, we could spin up a thousand nodes and it would take only a couple of hours to ingest a thousand books."

"Obviously, that also really helps in terms of expanding to new markets, when we need to upload content in a new language to the platform."

Towards continuous deployment

Switching to a microservices infrastructure based on Google Kubernetes Engine has transformed the way the Storytel development team works. "Our developers really like the new architecture and work environment. It is helping us to attract new talent, which is a big benefit," says Daniel. "It has empowered our developers to look after their codes and services without relying on an operations department to deploy them. They're more confident, and that has sped up how quickly things move forward. From a deployment cycle of two weeks, we now deploy some microservice updates several times a day."

"The infrastructure is also more robust. One service might go down, but it won't affect our core services and our users will still be able to sign up and stream audiobooks," says Daniel. "It is also more efficient, as Kubernetes automatically schedules workloads to make sure we are only using the resources we need, rather than having to build in redundant servers."

"Initially, we wanted to reduce operational overheads, such as server uptime. As this wasn't the core strength of our business, we left it to the experts. Now Google Cloud looks after this, and we can focus on optimization, innovation, and development, which is helping our expansion to new markets."

Daniel Bodner, CTO, Storytel

Now, Storytel is looking to move its streaming services over to Google Cloud and continue optimizing its infrastructure. "Our goal is to completely shut down our legacy system within two years," says Daniel. "For streaming, we are considering using Cloud CDN, or an interconnect with our current CDN. Eventually, we would like to move to continuous deployment of services, and in 2019, we want to start exploring machine learning features in Google Cloud."

"Another future plan is to offer more self-service analytics through BigQuery: we will provide our stakeholders with the raw data, and they can use Looker Studio to build their own reports," Daniel explains.

"Initially, we wanted to reduce operational overheads, such as server uptime. As this wasn't the core strength of our business, we left it to the experts. Now Google Cloud looks after this, and we can focus on optimization, innovation, and development, which is helping our expansion to new markets."

Tell us your challenge. We're here to help.

Contact us

About Storytel

Based in Sweden, Storytel is a rapidly expanding online audiobook and ebook subscription service, currently available in 15 countries.

Industries: Technology
Location: Sweden