Why we switched from Python to Go
Blog post from Stream
Stream switched its primary programming language from Python to Go due to Go's superior performance, especially in API operations, where it significantly outperforms Python. The decision was driven by Go's fast execution speed, efficient concurrency handling with goroutines and channels, and minimal boilerplate requirements, making it suitable for Stream's feed and chat platform that serves over 500 million end users. Go's straightforward syntax and enforced code formatting with Gofmt enhance developer productivity and team scalability. Despite its lack of a dominant framework and some limitations in error handling and package management, Go's robust ecosystem, especially for microservices with gRPC and protocol buffers, and its fast compile times, make it a strong choice for performance-critical applications. While Stream continues to use Python for dashboards and machine learning, Go is now favored for performance-intensive tasks, underscoring its effectiveness in reducing optimization time while maintaining high execution speeds.