Company
Date Published
Author
Coralogix Team
Word count
1610
Language
English
Hacker News points
None

Summary

Coralogix utilized the Go programming language, known for its performance and concurrency advantages, to optimize a service that parses billions of logs daily, achieving a significant CPU reduction of over 40%. Initially, the service consumed substantial CPU resources while running on AWS infrastructure, prompting Coralogix to conduct detailed profiling using Go's tools to identify bottlenecks, particularly high garbage collection (GC) activity. By upgrading to a newer Go version and using the GOGC flag to adjust the GC trigger, they effectively reduced CPU usage, increased memory consumption, and stabilized performance during peak times. Further optimization involved reducing unnecessary object allocations, such as converting customer IDs from int to string more efficiently, which led to additional CPU savings. The result was a more stable infrastructure, reducing the need for tuning based on exceptional cases and leading to overall improved service performance.