Scaling for MHHS: how Octopus Energy achieved a 50x cost reduction in margin data engineering
Summary
Octopus Energy re-architected its margin data pipelines to address the UK's Market-wide Half-Hourly Settlement (MHHS) regulation, which increased data points by 48x for its over 8 million customers. Facing a projected \$1 million annual cost increase and a \$23.63 cost per settlement date under its legacy system, the company developed a new architecture. This involved three specialized data streams for half-hourly settlement, smart tariff customers, and monthly standard tariff customers, all underpinned by a unified consumption layer. A key optimization was implementing Delta Lake's Change Data Feed, reducing processed rows from 25 billion to 300 million (a 98.8% reduction). Combined with targeted Spark and Delta optimizations and the use of Databricks Serverless, Octopus Energy achieved a 50x cost reduction, bringing the cost per settlement date down to \$0.48, which is 2x cheaper than the original legacy system, while improving data freshness from weekly to daily. The project was completed in three months.
Key takeaway
For Directors of AI/ML or Data Engineers scaling data infrastructure due to increased granularity, you must re-evaluate your architecture beyond simply adding compute. Aligning processing to natural data grains and implementing incremental processing, like Delta Lake's Change Data Feed, can yield massive cost reductions and improve data freshness. Audit existing optimizations and trust built-in query optimizers before adding custom logic to avoid unnecessary overhead.
Key insights
Re-architecting data pipelines for granular processing and incremental updates drastically reduces costs and improves data freshness.
Principles
- Align processing to natural data grains.
- Incremental processing transforms pipeline economics.
- Audit and remove unjustified compute operations.
Method
Octopus Energy re-architected into three specialized streams (Settlement, Half-Hourly, Monthly) with a unified consumption layer, using Delta Lake's Change Data Feed for incremental processing and targeted Spark/Delta optimizations.
In practice
- Implement Change Data Feed for 98.8% row reduction.
- Use broadcast joins for reference tables <500MB.
- Enable Liquid clustering for filter/join columns.
Topics
- Market-wide Half-Hourly Settlement
- Data Engineering
- Delta Lake Change Data Feed
- Apache Spark Optimization
- Databricks Serverless
- Energy Transition
- Cost Reduction
Best for: Data Engineer, Director of AI/ML, Consultant
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Databricks.