Agoda's Kotlin services have undergone significant improvements in coroutine management and debugging. This includes addressing issues with unbounded coroutines, optimizing serialization and deserialization processes, and resolving thread-safety bugs in open-source dependencies. The adoption of continuous profiling tools like Pyroscope has been instrumental in identifying and resolving these complex, layered problems, leading to substantial reductions in CPU and memory usage. This post details the technical implementation of the fixes for unnecessary deserialization, unbounded coroutines, and a thread-safety bug in Koin's ScopedInstanceFactory, resulting in a 5x reduction in resource usage.
All Agoda trails