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 API. Kong will route every incoming request with the specified public DNS to the associated target URL.
Then add extra functionality by using Kong Plugins. You can also create your own plugins.
...and then you can consume the API on port 8000 by requesting the public DNS specified. In production point the public DNS to Kong. It also supports URL path routing.
$ curl -i -X POST \ --url http://localhost:8001/apis/ \ --data 'request_host=test.com' \ --data 'upstream_url=http://mockbin.com'
$ curl -i -X POST \ --url http://localhost:8001/apis/test.com/plugins/ \ --data 'name=rate-limiting' \ --data 'config.minute=100'
$ curl -i -X GET \ --url http://localhost:8000/ \ --header 'Host: test.com'