Amos Bunde

Home / Projects / Case study

2.5 million rows a day, and the platform underneath

Building Copia's data platform for e-commerce across Kenya and Uganda: multi-AZ PostgreSQL replication with sub-10-second failover, CDC pipelines holding 15-minute freshness SLOs, and a recommendation engine whose targeted discounts cut the retargeting programme’s cost by 60% — while standing up the data engineering function itself.

Copia · e-commerce, Kenya & Uganda 2020 — 2022 AWS Role: platform lead / manager

Copia runs e-commerce for customers that most platforms ignore — including rural households ordering through a network of local agents. Behind that sits an unforgiving data problem: 2.5M+ rows a day moving through the pipelines across two countries, operational dashboards the business runs on, and ML systems that have to answer in under a second.

The problem

When I took over the platform, analytics and operations were competing with production traffic for the same databases, reporting freshness was unpredictable, and there was no dedicated data engineering function. The business needed three things at once: transactional infrastructure that would not go down, analytics that reflected reality within minutes rather than days, and a path to production ML — all on a startup budget.

Constraints

Architecture

The platform separates three concerns cleanly. Transactional: PostgreSQL on EC2 with both logical and physical replication across multiple availability zones — 99.95% uptime and <10-second failover for the systems that take orders. Analytical: a Lambda architecture feeding Amazon Redshift, using CDC patterns with incremental loads so the warehouse tracked the OLTP systems within a 15-minute freshness SLO, with Spark handling the heavy transformations. ML: SageMaker-based MLOps serving a recommendation engine at sub-second API latency, whose targeted discounts cut the retargeting programme’s cost by 60%.

Agents & apps Kenya · Uganda PostgreSQL · multi-AZ logical + physical replication 99.95% uptime · <10s failover CDC · Lambda · Spark 2.5M+ rows/day, incremental 15-min freshness SLO Amazon Redshift warehouse + data marts BI & operations dashboards SageMaker MLOps recommendation engine sub-second API · −60% cost recommendations back to apps STEP FUNCTIONS · AUTOMATED BACKUP / MONITORING / MAINTENANCE · −70% MANUAL OPS

Order traffic lands in replicated Postgres; CDC keeps Redshift fresh within 15 minutes; the same warehouse feeds BI and the recommendation models.

Design decision

CDC with incremental loads, rather than nightly full extracts, is what made 15-minute freshness affordable: the pipelines move only what changed, so warehouse cost scales with activity rather than with table size. The ML win was a business one — the recommendation engine’s targeted discounts are what cut the retargeting programme’s cost by 60% — delivered with response times protected by an explicit sub-second budget.

Beyond the pipelines

Automation through AWS Step Functions took backup, monitoring, and maintenance out of human hands, reducing manual operations time by 70%. I directed weekly engineering sprints for distributed teams across Asia and Africa, and established the data governance council and enterprise data strategy that gave data quality, security compliance, and reliability standards an owner across the organisation.

Impact

2.5M+ rows/day
Moved through the pipelines for e-commerce in Kenya and Uganda
99.95%
Uptime with <10s failover on mission-critical transaction systems
15min
Warehouse freshness SLO via CDC incremental loads
60%
Retargeting-programme cost cut by the recommendation engine’s targeted discounts
70%
Less manual operations time after Step Functions automation
0→ team
Data engineering function built, hired, and run from scratch