All case studies
Case Study · AdTech · Legacy modernization

Revenue infrastructure for a global AdTech platform.
From legacy to cloud-native in 12 months.

A newly formed team inherited grown PHP legacy code running revenue reporting for a global AdTech platform with nine-figure turnover. The brief: modernize it and migrate it into a scalable AWS environment while it keeps running. Timeline: 12 months.

Book a call
Book a call
Architecture diagram: legacy modernization and AWS migration of a global AdTech revenue infrastructure
–90%Incidents
90%+Test coverage
0 → 100%Infrastructure as Code
The starting point

New team. Old code. No safety net.

A newly formed team was spun out of an existing large team and took over responsibility for the PHP legacy code behind revenue reporting. The code was running in production, but it had grown over years: no test coverage, no documented infrastructure, no infrastructure as code.

Revenue feeds from external partners were imported and normalized daily, campaign reports delivered to internal teams and external partners. The system had to deliver correct data every day, in an environment where mistakes have immediate business consequences. Every change was a risk because nobody knew what it would trigger.

The challenge

Modernizing while it keeps running.

No test coverage means no safety. Every change to the legacy code was a blind flight. Incidents happened regularly, the causes were hard to find, the fixes risky.

At the same time there was no infrastructure as code. The AWS infrastructure was configured manually, undocumented, not reproducible. What ran in the cloud was known only to the person who had set it up. The task was to modernize the system, migrate it to PHP 8, move it into a clean AWS environment and deliver correct revenue data every day at the same time. Twelve months, live operations, no downtime allowed.

My approach

Understand.
Secure.
Migrate.

01
Understand and secure the codebase

Analysed the legacy code and built test coverage from 0 to over 90%. PHPUnit for unit tests, Codeception for acceptance tests that lock down the system behaviour towards external partners. Only once changes are safe can you modernize.

02
PHP 8 migration

Migrated the entire legacy code to PHP 8, including reworking every outdated component. Modernized Symfony as the framework base. Step by step, controlled, with test coverage as a safety net.

03
Cloud migration to AWS

Migration into a scalable AWS environment: ECS for containerized services, EC2 for compute-intensive workloads, SQS and SNS for asynchronous processing, RDS for relational data, Athena and Glue for analytical queries and data transformation. The entire infrastructure as code in Terraform, versioned and reproducible. Nothing configured manually any more.

04
Estimates per click calculation for media buyers

Built the estimates-per-click calculation as a standalone service. The values are calculated daily and provided as an export so media buyers can optimize their campaigns based on data. Push budget into high-performing channels, cut back weak ones. A direct connection between technical infrastructure and measurable business outcome.

05
Data availability through AWS DataZone

Revenue data is made available internally to every department through AWS DataZone. No more distributing reports by hand, no data silo. Every department has access to the data it needs.

Legacy code with no tests, no IaC and regular incidents?

Find out in a few minutes how high your risk really is.

Start the free system check
Calculate your risk score now
or book a call directly
The outcome

More stable. Faster. Available to everyone.

–90%

Incidents

Test coverage from 0 to over 90% explains why incidents dropped by 90%.

90%+

Test coverage

PHPUnit for unit tests, Codeception for acceptance tests: the system behaviour is fully locked down.

100%

Infrastructure as Code

The entire AWS infrastructure in Terraform: versioned, reproducible, no more manual clicking.

Grown PHP legacy code with no tests, no documented infrastructure and regular incidents, moved into a modern, stable AWS environment. Test coverage from 0 to over 90% explains why incidents dropped by 90%. The infrastructure is fully versioned as code. Estimates-per-click values are calculated daily and available to media buyers for campaign optimization. Revenue data is available to every department through AWS DataZone. A modernization while it kept running, in a nine-figure turnover environment, without a single day of downtime.

Technologies used

Proven tools. No experiments.

Backend
  • Golang
  • gRPC
  • Symfony
  • PHP 8
Infrastructure
  • AWS ECS
  • EC2
  • SQS
  • SNS
  • RDS
  • Athena
  • Glue
  • DataZone
  • DynamoDB
  • S3
  • IAM
  • Terraform
  • Docker
Observability
  • OpenTelemetry
  • Datadog
  • Grafana
  • CloudWatch
Testing
  • PHPUnit
  • Codeception
  • Testcontainers
Previous case studyInternational VPN SaaSNext case studyPlatform for a trade magazine