Handling billions of events per day with Kotlin Coroutines
summary
Migrates a 12 year Java app to Kotlin Coroutines and almost doubles throughput while processing billions of events per day with millisecond latency, yielding a 25% cost reduction (millions $ annually). Replaces Jetty with Vertx, rewrites filters and controllers to suspendables, converts hot Cassandra paths to nonblocking driver calls via coroutines and later to Kotlin Flow. Chronicles surprises: request scope DI via thread context elements, CPU microbursts, failed canaries, splitting heavy logic into a gRPC Spring Boot service before success.
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
33mVisualising concurrency with Kotlin
40mConcurrency made easy with Kotlin Coroutines
47mRediscovering gRPC with Kotlin coroutines
52mSpring Boot with Kotlin, Kofu and Coroutines
01h 03mUsing Kotlin Coroutines for Asynchronous and Concurrent Programming
