Member-only story
CODEX
Learning Go Lang Days 13 to 18— Building a caching reverse proxy in Go Lang

I had fun with my last application so when deciding what I wanted to work on next I wanted to work on something that would be just as much fun.
I also wanted something that would allow me to start experimenting with using 3rd party library's as well as be along the lines of something I might actually find a use for in the future. I therefore came up with the idea of building a caching reverse proxy. For those who haven’t come across reverse proxies before, Wikipedia sums it up as follows:
A HTTP/S reverse proxy can read and modify all traffic and IPs of web users going through it. In order to filter/cache/compress or otherwise modify the traffic.
https://en.wikipedia.org/wiki/Reverse_proxy
In our case we will be capturing the requests and caching them locally so that we can speed up an otherwise slow connection to the server.
Getting Started
To start with lets use a basic web server as a starting point, this is based on what we wrote on one of the previous days.