Taming Go’s Memory Usage
A couple months ago, we faced a question many young startups face. Should we rewrite our system in Rust?
At the time of the decision, we were a Go and Python shop. The tool we’re building passively watches API traffic to provide “one-click,” API-centric visibility, by analyzing the API traffic. Our users run an agent that sends API traffic data to our cloud for analysis. Our users were using us to watch more and more traffic in staging and production—and they were starting to complain about the memory usage.
This led me to spend 25 days in the depths of despair and the details of Go memory management, trying to get our memory footprint to an acceptable level. This was no easy feat, as Go is a memory-managed language with limited ability to tune garbage collection.
Source: Taming Go’s Memory Usage, or How We Avoided Rewriting Our Client in Rust, an article by Mark Gritter.