Built on top of NGINX, Kong can be fully operated with a simple and easy to use RESTful API.
Put your services behind Kong and add powerful functionality through Kong Plugins, in one command.
Kong allows developers to reduce complexity and deployment times in implementing an API solution on NGINX.Owen Garrett, NGINX Head of Products
After installing and starting Kong, use the Admin API on port 8001 to add a new Service. Services represent your upstream servers exposing APIs/microservices.
Once you have a Service, expose it to the clients by adding one (or many) Routes for it. Routes control how client requests are matched and proxied to Services.
Add extra functionality by using Kong Plugins. You can also create your own plugins.
Clients can now consume your upstream API/microservice through Kong's proxy server, running on port 8000 by default.
$ curl -i -X POST \ --url http://localhost:8001/services/ \ --data 'name=example' \ --data 'url=http://your-api.com'
$ curl -i -X POST \ --url http://localhost:8001/services/example/routes/ \ --data 'hosts=example.com'
$ curl -i -X POST \ --url http://localhost:8001/plugins/ \ --data 'name=rate-limiting' \ --data 'service_id=<example_service_id>' \ --data 'config.minute=100'
$ curl -i -X GET \ --url http://localhost:8000/ \ --header 'Host: example.com'