SonyLIV Improves CMS Performance By 98% On MongoDB Atlas
As one of the world's leading technology and media companies, Sony needs little introduction. Founded in 1954, Sony’s portfolio spans game & network services, music, pictures, entertainment technology & services, imaging & sensing solutions, financial services, and more.
SonyLIV Technology, the digital arm of Sony Pictures Networks, has a strong footprint in India where it operates a leading over-the-top (OTT) video-streaming platform. OTT platforms deliver streamed content via internet-connected devices, a popular way of consuming content in India.
A core part of SonyLIV’s operations is built on MongoDB Atlas.
OTTs platforms handle massive amounts of datasets across video, audi, and text formats; this is only expected to keep growing as the number of OTT video users in India is set to reach 634.3 million by 2029. As a result, a strong content management system (CMS) is central to ensuring users can easily discover and receive new recommended content, while also facilitating a smooth, enjoyable viewing experience.
At MongoDB.local Bengaluru in September 2024, Sumon Mal, Vice President of Backend Engineering at SonyLIV, described how the company built a new CMS platform—‘Blitz’— using MongoDB’s Node.js SDK and React Native SDK. Blitz hosts 495,000 documents that need to be easily accessible and editable by SonyLIV’s team, as well as by end-users.
MongoDB’s flexible document model was chosen because it could handle that scale, as well as handle the large, dynamic video files that OTT businesses are built on.
The challenge
Before transitioning to MongoDB Atlas, SonyLIV relied on a legacy relational database, which posed four key challenges:
-
Poor searchability: The content stored in the relational database was not easily searchable. This was detrimental to and compromised the end-user experience.
-
Operational overhead: The rigid structure of the relational database hindered the engineering team from adapting quickly to dynamic and evolving data requirements.
-
Complex maintenance: Managing and maintaining the database was a complex, time-consuming task. The rigid data model from the legacy database was slowing down development speed and time to market.
-
Slow content updates: Due to the lack of bulk processing capabilities, publishing new content or updating existing videos took a significant amount of time—up to half a day each. This delay hindered SonyLIV’s ability to rapidly respond to content demands or push new updates to their users.
“This was a business risk,” said Sumon. “These [challenges] pushed [us] to go for the modernization of this particular tech stack.”
The first step of this modernization was to relaunch SonyLIV’s streaming platform on Amazon Web Services (AWS). However, the project required converting 60,000 hours of video into multiple output formats and scaling to support more than 1.6 million simultaneous users.
SonyLIV’s legacy relational database was unable to handle that sort of scale. The company’s new CMS platform could not meet the increased demand unless it had more power and flexibility.
Migration to MongoDB Atlas: improved performance and lowered search query latency by 98%
SonyLIV chose to build Blitz on top of MongoDB Atlas and to migrate SonyLIV’s decade-old data. Concurrently, the engineering team started publishing all of its new content via the new CMS underpinned by the MongoDB Atlas technology.
Suman’s team was able to work on both fronts, uploading and publishing new content while the old data was being migrated. Suman also highlighted the importance of working closely with the MongoDB Professional Services team to unlock the full power of the document model and the Atlas platform in a way that would meet SonyLIV’s specific needs.
For example, during the development phase, MongoDB Professional Services helped identify opportunities to optimize the new stack, such as API latency. Operations such as searching for data took up to 1.3 seconds. MongoDB’s Professional Services team immediately determined this was below anticipated response times and recommended an alternative approach that yielded immediate results.
“I know very well how, as a developer, we think we will go read some blogs, YouTube videos nowadays, AI solutions. But the best way to do it is to ask the subject matter experts. So the MongoDB Professional Services team helped us to optimize it,” said Suman.
Improving performance with MongoDB Atlas Search
Suman and his team worked closely with the MongoDB Professional Services to improve index optimization and workload isolation as the number of data sets MongoDB Atlas needed to process increased.
“One of the problems was our overall collection size and the capabilities in terms of the indexes,” said Suman. “Day by day, we are increasing the amount of new content that is getting published (thousands of pieces of content being added every single day). And on top of that, we have the decade-old data.”
Out of 5 lakh [500,000], close to 2.7 lakh [270,000] documents were archived in SonyLiv’s legacy system. These documents were moved to online archiving on MongoDB Atlas. “Now, if you take any other database [...] you literally have to shift your data to somewhere else for archival; you don
MongoDB Atlas’ Online Archive feature enabled SonyLIV to segregate data, which in turn improves performance greatly. Additionally, datasets are more precise and respond much faster, including while employing multiple indexes.
SonyLIV also shifted toward using MongoDB Atlas Search to optimize the performance caused by $regex queries (sequences of characters used to search and locate specific sequences of characters that match a pattern). The team created an Atlas Search index on the collection. The native full-text search capabilities simplified the architecture and improved performance.
The latency went from 1.3 seconds to 0.022 to 0.030 seconds, a 98% performance gain.
This resulted in a flexible, high-performance CMS that reduces time-to-market and enhances user experience. The system now handles over 500,000 content items and supports real-time updates with minimal latency.
The key takeaway from this story is the outcomes that can be derived from combining MongoDB Atlas’ powerful technology with the unique expertise from our teams on the ground. This is what can accelerate customers’ projects, help them unlock more value out of the platform, and ultimately bring flawless customer experiences to the world, faster.
However, we should not underestimate the value MongoDB’s team of experts can bring. Ultimately, it is about helping customers use the technology as effectively as possible, and derive the greatest impact from the MongoDB Atlas platform.
“If there is a black swan event and if I call [MongoDB subject matter expert], I know he will respond, and his team will be there to support me. I don't need to worry,” said Sumon. “Our collaboration goes further, and we optimize the overall MongoDB case to build our application [...], and behind the scenes empower all the content seamlessly publishing every single day.”
Learn more about MongoDB Atlas on our product page.
Get started with MongoDB Atlas Search today by visiting our product page to learn more.