Kong is an open-source API gateway and a microservices management layer, delivering high performance and reliability. It is a combination of two libraries worth mentioning. One is OpenResty and another one is Nginx. Kong is a wrapper around these two main components. OpenResty is a fully-fledged web platform that integrates Nginx and Lua. Lua is another programming language similar to Go. Kong is written in Lua. We use Kong as a tool for deploying our Go REST services. The main topics we cover are:
- Installation of Kong and the Kong database
- Adding our API to Kong
- Using the plugins
- Logging in Kong
- Rate limiting in Kong
Kong needs a database to run. It could be either Cassandra or PostgreSQL. Since we are already familiar with PostgreSQL, we chose it. Where to install them? For illustration, we can install them on our local machine, but there is a drawback; it can screw up our machine. In order to test the setup, we are going to use Docker. Docker can create containerized...