Giter Club home page Giter Club logo

kong's Introduction

KONG: Microservice Management Layer

Build Status License Badge Gitter Badge

Kong was built to secure, manage and extend Microservices & APIs. If you're building for web, mobile or IoT (Internet of Things) you will likely end up needing to implement common functionality on top of your actual software. Kong can help by acting as a gateway for any HTTP resource while providing logging, authentication and other functionality through plugins.

Powered by NGINX and Cassandra with a focus on high performance and reliability, Kong runs in production at Mashape where it has handled billions of API requests for over ten thousand APIs.

Core Features

  • 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 TCP, UDP or to disk.
    • 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 or authentication.
    • Transformations: Add, remove or manipulate HTTP params and headers on-the-fly.
    • CORS: Enable cross-origin requests to your APIs that would otherwise be blocked.
    • Anything: Need custom functionality? Extend Kong with your own Lua plugins!

Benchmarks

We set Kong up on AWS and load tested it to get some performance metrics. The Kong setup consisted of two m3.medium EC2 instances; one for Kong, the other running Cassandra.

Both servers had their limits increased:

Added fs.file-max=80000 to /etc/sysctl.conf

Added the following lines to: /etc/security/limits.conf

*          soft     nproc          80000
*          hard     nproc          80000
*          soft     nofile         80000
*          hard     nofile         80000

For these benchmarks a third server running an optimized "hello world" web server written in C was used as the target, while not exactly "real world usage" not having the target as a bottleneck we hope to get a more accurate assessment of Kong itself.

After adding the target_url into the Kong instance we load tested while ramping up from 1 to 2000 concurrent connections over 120 seconds. All together 117,185 requests with an average of 976 req/second or about 84,373,200 req/day went through Kong and back with only a single timeout.

Documentation

Full versioned documentation is available at GetKong.org:

Development

Please see the CONTRIBUTING.md if you would like to have your changes merged into Kong.

  1. Clone the repository and make it your working directory.
  2. Run [sudo] make install

This will build and install the kong luarock globally.

  1. Run make dev

This will install development dependencies and create your environment configuration files:

  • kong_TESTS.yml
  • kong_DEVELOPMENT.yml
  1. Run the tests:
make test-all
  1. Run Kong with the development configuration file:

    $ kong start -c kong_DEVELOPMENT.yml

Makefile Operations

When developing, use the Makefile for doing the following operations:

Name Description
install Install the Kong luarock globally
dev Setup your development environment
run Run 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/
coverage Run unit tests + coverage report (only unit-tested modules)
test Run the unit tests
test-all Run all unit + integration tests at once

License

Kong is provided under the MIT License.

kong's People

Contributors

gitter-badger avatar lookfirst avatar nijikokun avatar rainum avatar sonicaghi avatar subnetmarco avatar thibaultcha avatar wpjunior avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.