Building an Autoscaling HTTP Proxy for Kubernetes.
You probably already know generally how HTTP proxies work. You might have even built one! Out of the box, Go comes with a ReverseProxy type in the standard library, but a production deployment -- especially in Kubernetes or similar distributed systems -- needs to do more than the standard library. Some additional requirements include autoscaling systems, connection backoffs, request rewriting, and more.
We ran into these requirements in building the open source KEDA HTTP Addon project
. In this talk, I'll briefly review the requirements of such a proxy and we'll proceed to live code a comparable one from scratch.
You'll walk away with a deeper understanding of the net, net/http and net/http/httputil packages as well as several relevant concurrency patterns you can use to build your own proxies - and other robust and performant networking systems in Go.