THEIR CHALLENGE
Using MongDB Professional Services to accelerate operations
Founded in 2019, Modjo is a fast-growing SaaS platform on a mission. The business aims to enhance the productivity and performance of sales teams by leveraging AI to extract actionable insights from customer interactions.
Modjo’s Conversational Intelligence Platform captures and analyzes customer conversations using data from various platforms, such as Zoom, Skype, and Google Meet, to deliver insights through an intuitive user interface. Currently serving over 400 sales organizations, Modjo enables sales leaders to identify coaching opportunities, replicate winning behaviors, and optimize sales outcomes.
Modjo’s solution is designed to process calls using two data science pipelines; one for transcription and one for speaker identification. It has been using MongoDB Atlas since 2023 to support its operations, with MongoDB serving as the background database for the orchestrator, logging task statuses, and determining the next steps. Writes to the database are performed via a custom API (Lambda + API Gateway), while reads are direct.
However, Modjo was experiencing 100% CPU saturation, despite using a large cluster instance. High system loads were leading to performance bottlenecks, while data access patterns were affecting application efficiency and causing unnecessary operational and infrastructure costs.
“After a few months of this, MongoDB reached out to me and said ‘You seem to spend more than what we would expect from a client of your size’,” said Gabrielle Béranger, Senior Data and Platform Engineer at Modjo. “They wanted to help us find out the cause and were very proactive about it.”
OUR SOLUTION
The Professional Services effect
Béranger initially suspected that an inappropriate schema was the primary cause of the saturation problems, resulting in ineffective indexing and very high query targeting (around 40,000). MongoDB Professional Services validated this assumption and helped her prepare a schema migration plan. The migration went smoothly, and this change dramatically reduced query targeting from 40,000 to 1, solving the indexing issue. However, despite this improvement, the CPU saturation persisted.
After conducting further analysis, Béranger came back to MongoDB Professional Services with her observations and leads for investigation. The MongoDB Professional Services consultant offered initial recommendations and, with some extra detective work, was able to pinpoint the root cause in the few days following the session. “After the session, the consultant monitored the impact of the implementation of his recommendations”, said Béranger. “He carried out further investigations, which enabled him to precisely identify the source of the problem. He demonstrated great professionalism, technical expertise and analytical finesse, exploring different avenues and not contenting himself with our initial intuitions.”
The investigation revealed two key issues. Firstly, the application was opening many new database connections for each operation without proper reuse, leading to frequent peaks in connection counts. This was particularly evident in Modjo’s AWS Lambda environment, where each instance was initiating separate connections to MongoDB, causing persistent CPU usage. Secondly, the application was opening a large number of sessions without properly closing them after operations. Each request was also processing large datasets, putting further strain on the CPU.
Based on this diagnosis, Béranger worked with the Modjo technical team to implement some specific but minor code changes.
The first one ensures that the MongoDB client is created only once instead of for every database operation and that it’s reused. The second one makes sure that database sessions opened by MongoDB are explicitly closed after each data retrieval operation.
