- Website: getkong.org
- Website Repo: github.com/getkong.org
- Docs: getkong.org/docs
- Mailing List: Google Groups
Kong was created to secure, manage and extend Microservices & APIs. Kong is powered by the battle-tested tech of NGINX and Cassandra with a focus on scalability, high performance & reliability. Kong runs in production at Mashape handling billions of requests to over ten thousand APIs.
- CLI: Control your Kong cluster from the command line just like Neo in The Matrix.
- REST API: Kong can be operated with its RESTful API for maximum flexibility.
- Scalability: Distributed by nature, Kong scales horizontally simply by adding nodes.
- Performance: Kong handles load with ease by scaling and using NGINX at the core.
- Plugins: Extendable architecture for adding functionality to Kong and APIs.
- Logging: Log requests and responses to your system over HTTP, TCP, UDP or to disk.
- SSL: Setup a specific SSL certificate for an underlying service or API
- Monitoring: Live monitoring provides key load and performance server metrics.
- Authentication: Manage consumer credentials query string and header tokens.
- Rate-limiting: Block and throttle requests based on IP, authentication or body size.
- Transformations: Add, remove or manipulate HTTP requests and responses.
- CORS: Enable cross-origin requests to your APIs that would otherwise be blocked.
- Anything: Need custom functionality? Extend Kong with your own Lua plugins!
If you're building for web, mobile or IoT (Internet of Things) you will likely end up needing common functionality on top of your actual software. Kong can help by acting as a gateway for HTTP requests while providing logging, authentication, rate-limiting and more through plugins.
We set Kong up on AWS and load tested it to get some performance metrics. The setup consisted of three m3.medium
EC2 instances; one for Kong, one for Cassandra and a third for an upstream API. After adding the upstream API's target_url
into Kong we load tested from 1 to 2000 concurrent connections. Complete reproduction instructions are available and we are currently working towards automating a suite of benchmarks to compare against subsequent releases.
Over two minutes 117,185 requests with an average latency of 10ms at 976 requests a second or about 84,373,200 requests a day went through Kong and back with only a single timeout.
-
Download the latest released version of Kong, and install it on your development machine. This will install all the required dependencies.
-
Clone the repository and make it your working directory.
-
Run
[sudo] make install
This will build and install the kong
luarock globally.
- Delete the
/etc/kong
folder:[sudo] rm -rf /etc/kong
This is necessary to remove the configuration file of the previous Kong installation at step 1.
- Run
make dev
This will install development dependencies and create your environment configuration files:
kong_TESTS.yml
kong_DEVELOPMENT.yml
- Run the tests:
make test-all
-
Run Kong with the development configuration file:
$ kong start -c kong_DEVELOPMENT.yml
When developing, use the Makefile
for doing the following operations:
Name | Description |
---|---|
install |
Install the Kong luarock globally |
dev |
Setup your development environment |
clean |
Clean your development environment |
start |
Start the DEVELOPMENT environment (kong_DEVELOPMENT.yml ) |
seed |
Seed the DEVELOPMENT environment (kong_DEVELOPMENT.yml ) |
drop |
Drop the DEVELOPMENT environment (kong_DEVELOPMENT.yml ) |
lint |
Lint Lua files in kong/ and spec/ |
test |
Run the unit tests |
`test-integration | Run the integration tests (Kong + DAO) |
`test-plugins | Run unit + integration tests of all plugins |
test-all |
Run all unit + integration tests at once |
coverage |
Run all tests + coverage report |
Complete & versioned documentation is available at GetKong.org: