Data EngineeringDatabricks MigrationBusiness Services

Cutting Infrastructure Costs by 35% With a Unified Databricks Lakehouse for a Business Services Platform

Author : Team Aays5-6 min read

Updated: Oct 22, 2026

Dark data center server aisle with the text “MongoDB to Databricks Lakehouse Migration” for an Aays success story

Discover how Aays helped one of India’s largest work-as-a-service platforms enable faster data processing, lower infrastructure costs, and build a scalable foundation for analytics by replacing their fragmented data stack with a unified Databricks Lakehouse.

35%
Lower Costs
In infrastructure and compute spend
28%
Faster
Data processing speed
1,000+
Delta Tables
Replacing monolithic MongoDB dumps

About the Client

The client is one of India’s largest work-as-a-service platforms, helping enterprises run their business at scale through the end-to-end execution of core business functions. Through their network of 1.5 million+ workers, they give businesses access to 19,000+ pin codes and 1,000+ cities across India, enabling enterprises to scale operations on the ground without building out their own execution infrastructure.

They power enterprise operations across nine hyperlocal and digital service lines. Running an operation of this scale generates a large volume of data across systems, and as the business expanded, so did the pressure on their data infrastructure to keep up.

The Problem

A Data Stack That Had Outgrown Itself

The client’s legacy setup was a patchwork of MongoDB, MySQL, BigQuery, and EC2. It couldn’t keep up. It was slow, expensive, and disjointed.

Their biggest issue was the massive unstructured data dumps in MongoDB. Even basic queries were sluggish and compute-heavy because of this.

They needed a modern, unified platform that could ingest, clean, transform, and serve data at speed.

The Solution

Modernizing the Stack with the Databricks Lakehouse

To bring everything together, we helped the client migrate to the Databricks Lakehouse, consolidating batch and streaming pipelines, handling schema evolution, optimizing compute costs, and adding a full-scale data transformation layer.

This involved two parallel migrations:

MongoDB

With both fixed and evolving schemas

MySQL

With structured, transactional datasets

Each migration path included:

  • Full historical data loads
  • Continuous incremental update pipelines
  • Custom compute optimization
  • Workflow redesign for performance
  • Schema evolution handling where required

MongoDB Migration With Real-Time Streaming

Fixed-Schema Collections

We started with collections that had consistent schemas. Using the MongoDB Spark Connector, historical data was ingested into Delta tables. A centralized ETL notebook handled multiple collections efficiently.

Once the data was loaded, Spark Structured Streaming pipelines were built for each collection, using MongoDB Change Streams to capture and process real-time updates, with fault isolation and parallel execution to ensure scalability.

Evolving-Schema Collections

Collections with dynamic fields needed a more flexible approach:

  • Historical data was ingested via Python, processed using Pandas for data type handling, and then loaded into Spark to write into Delta tables.
  • For real-time sync, Mongo Watch was used to track inserts, updates, and deletes.
  • Pipelines automatically converted data types and handled schema changes on the fly.

This approach ensured uninterrupted ingestion, even as the data structure evolved.

Migrating MySQL: Reliability and Performance at Scale

For MySQL, we ran a structured, two-phase migration:

Historical Load

JDBC connectors were used to map and load data from MySQL tables into Delta tables, with integrity checks to maintain consistency.

Incremental Load

Spark jobs queried for data changes at fixed intervals and synced them into Delta tables.

One table was consuming more than half the migration time. To fix it:

  • The workflow was split into two parallel tracks: one dedicated to the large table, the other handling the rest.
  • Both tracks used the same cluster, improving execution time and scalability.

Initially, general-purpose clusters were used, but memory bottlenecks prompted a shift. We switched to memory-optimized instances with high IOPS, which significantly improved throughput, reduced failures, and boosted job reliability across both MongoDB and MySQL pipelines.

The cornerstone of this migration was data modeling and optimization.

Previously, the client’s data was stored in MongoDB as large JSON-like dumps, which were difficult to parse or query efficiently. Analytical queries required scanning massive documents or collections, leading to long execution times and poor performance.

With Databricks, we:

  • Split this monolithic data into 1,000+ Delta tables, organized by business domain, access pattern, and downstream usage.
  • Applied partitioning and Z-ordering for optimization.

This meant that instead of scanning a huge dump every time, queries could now hit just the relevant table and partition, drastically improving performance and lowering compute cost.

Collections without a fixed schema were among the most complex to migrate. For these, we:

  • Built Python-based pipelines for extraction and transformation
  • Scheduled jobs to load cleaned data into Delta tables
  • Implemented real-time streaming with schema merging to support continuous ingestion

This allowed the system to dynamically evolve with new fields, avoiding pipeline failures and ensuring data completeness.

The Impact

The migration delivered a future-ready data platform that is unified, resilient, and efficient, with:

Simplified Stack

Replaced MongoDB, MySQL, BigQuery, and EC2 with one centralized platform

Real-Time Analytics

Faster pipelines and Databricks SQL accelerated insight generation

Better Governance

Unity Catalog brought consistency, access control, and auditability

Zero Data Loss

Unlike the previous setup, invalid records are now preserved in a separate table, enhancing traceability and data quality.

35%
Lower Infrastructure and Compute Costs
By consolidating the data stack and optimizing compute, the client saw substantial cost reductions.
28%
Faster Data Processing
Real-time pipelines and high-performance clusters dramatically reduced latency.
40%
Higher Team Productivity
With fewer systems to manage and more reliable pipelines, the data team now spends more time on strategic initiatives instead of troubleshooting.

Why It Matters

With Databricks at the core, the platform is now built to support high-volume, high-complexity data operations. From real-time business insights to scalable governance and cost control, the new lakehouse architecture enables the organization to meet the demands of rapid growth and evolving enterprise needs.