Coder Social home page Coder Social logo

kong's Introduction

KONG: Microservice Management Layer

Build Status License Badge Gitter Badge

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.

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 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!

Architecture

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.

Benchmarks

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.

Development

  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. Delete the /etc/kong folder: [sudo] rm -rf /etc/kong

This is necessary just in case you have previously installed Kong with a package distribution.

  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
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/
coverage Run unit tests + coverage report
test Run the unit tests
test-all Run all unit + integration tests at once

Documentation

Complete & versioned documentation is available at GetKong.org:

kong's People

Contributors

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

Watchers

James Cloos 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.