So you want to expose Go on the Internet
Dec 26, 2016Filippo Valsorda

Summary
This post details how to expose Go services directly to the internet by optimizing `crypto/tls` and `net/http` configurations. It provides specific guidance on setting secure TLS cipher suites, curve preferences, and implementing crucial timeouts (`ReadTimeout`, `WriteTimeout`, `IdleTimeout`) to ensure stability and prevent resource exhaustion. It also covers HTTP/2 considerations and best practices for `ServeMux` usage and logging, marking a shift from relying solely on reverse proxies to directly exposing Go applications with enhanced security and performance.
More from the Data Infrastructure & Analytics trail
- Introducing Cloudflare Basin: an open, serverless data platform, now generally available
- Introducing the Billable Usage API: programmatic cost visibility for Cloudflare
- Announcing the Monetization Gateway: charge for any resource behind Cloudflare via x402
- How we built Cloudflare's data platform and an AI agent on top of it
- Iran's Internet is partially restored, Cloudflare Radar data shows