This chapter is dedicated to showing how we can deploy our API services into production. One way is to run the Go binary and access it through the IP: Port combination directly from the client. That IP will be the Virtual Private Server (VPS) IP address. Instead, we can have a domain name registered and pointed to the VPS. The second and better way is to hide it behind a proxy server. Nginx is such a proxy server, using which we can have multiple application servers under one umbrella.
We saw how to install Nginx and start configuring it. Nginx provides features such as load balancing and rate limiting, which could be crucial while giving APIs to clients. Load balancing is the process of distributing loads among similar servers. We saw what types of loading mechanisms are available. Some of them are Round Robin, IP Hash, Least Connection, and so on. Then, we added authentication...