GetYourGuide's Clickstream Data Collector - A Move From Akka To Pekko

Robert Bemmann, Bora Kaplan2 Oct 2023

Problem

GetYourGuide's Analytics Pipeline Collector is an HTTP API that validates clickstream events and forwards them to Kafka. It serves the website and native apps, receives between 200 to 300 million events per day, and runs on Kubernetes with autoscaling. It is written in Scala on Akka modules (akka-slf4j, akka-stream, akka-http, akka-http-spray-json). Lightbend moved Akka from an open-source license to the Business Source License, which forced the migration. A rewrite was not needed.

Example from the article: after renaming imports and dependencies, the code compiled, yet unit tests and local endpoints misbehaved because two config names were not recognized.

Solution in brief

Replace Akka with Apache Pekko, the open-source fork of Akka 2.6.x. Most of the work is renaming group ids, import prefixes and config keys. Three traps cost the time: mixed Pekko versions across modules, renamed third-party libraries and config names that compile but are not recognized. The team needed about 4 days in total.

Questions this case answers
  • How to migrate a high-volume event-ingestion service to a forked framework after a license change while keeping its endpoints and behavior unchanged
  • How to move a Scala event-collector service off Akka after its license change without rewriting it?
  • How to find what breaks when swapping Akka modules for their Apache Pekko equivalents?
  • How to fix the 'Mixed versioning is not allowed' error in an sbt build with Pekko?

Tools and methods

  • Apache Pekko — drop-in fork of Akka 2.6.x, the migration target
  • Akka — the original framework being replaced
  • sbt — build tool; sbt-dependency-graph finds version conflicts
  • Apache Kafka — destination for validated events
  • Kubernetes — deployment with autoscaling
  • Kamon — tracing and latency telemetry, not yet Pekko-ready
Continue reading — it's free

Google or a one-time email code. No password.