Handling billions of events per day with Kotlin Coroutines
summary
Migrates a 12‑year blocking Java app to an asynchronous model using Kotlin coroutines and Kotlin Flow, swaps Jetty for Vert.x, keeps most Java code and integrates Reactor, Guava listenable futures and the Cassandra async driver. Handles billions of events/day with millisecond latency, cuts threads from >1k to a few, nearly doubles web‑layer throughput and achieves a 25% cost reduction (millions/year). Hits production microbursts and GC/CPU contention, fixes by extracting heavy segmentation into a separate gRPC service and routing by request weight.
AI-written summary · about
chapters (10)
- 0:00Start
- 3:00Request processing flow
- 3:57Application structure
- 5:42Business logic
- 12:20Data Access API | Hidden blocking operation
- 13:07Data Access API -Non-blocking transformation
- 23:26Production performance
- 27:31Flame Graph
- 33:48The refined architecture
- 35:43Lessons learned
related talks
41mHandling billions of events per day with Kotlin Coroutines
51mServer-side Kotlin with Coroutines
44mInter-Reactive Kotlin Applications
47mRediscovering gRPC with Kotlin coroutines
33mVisualising concurrency with Kotlin
01h 03mUsing Kotlin Coroutines for Asynchronous and Concurrent Programming
40mConcurrency made easy with Kotlin Coroutines
52mSpring Boot with Kotlin, Kofu and Coroutines
