Coder Social home page Coder Social logo

wangfakang / kong Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kong/kong

1.0 2.0 1.0 102.8 MB

:monkey: Open-source, Microservice & API Management Layer built on top of NGINX

Home Page: https://getkong.org

License: Apache License 2.0

Shell 0.12% Makefile 0.24% Lua 98.12% Python 1.52%

kong's Introduction

Microservice & API Management Layer

Kong runs in production at Mashape to secure, manage and extend over 15,000 APIs, while handling billions of requests per month. Kong is backed by the battle-tested NGINX with a focus on scalability, high performance & reliability.

Website | Documentation | Installation | Mailing List | Gitter Chat | freenode: #kong

Summary

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.
  • Geo-Replicated: Configs are always up-to-date across different regions.
  • 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.
    • OAuth2.0: Add easily an OAuth2.0 authentication to your APIs.
    • Logging: Log requests and responses to your system over HTTP, TCP, UDP or to disk.
    • JWT: Verify and authenticate JSON Web Tokens.
    • HMAC: Add HMAC Authentication to your APIs.
    • ACL: Acccess Control for your API Consumers.
    • IP-restriction: Whitelist or blacklist IPs that can make requests.
    • Response-Rate-Limiting: Rate limiting based on custom response header value.
    • Analytics: Visualize, Inspect and Monitor API traffic with Galileo.
    • 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!

For more info about plugins, you can check out the Plugin Gallery.

Why Kong?

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've load tested Kong and Cassandra on AWS; you can see our benchmark report here.

Distributions

Kong comes in many shapes. While this repository contains its core's source code, other repos are also under active development:

Community Resources and Tools

Resources:

Videos:

Tools:

Roadmap

You can find a detailed Roadmap of Kong on the Wiki.

Development

If you are planning on developing on Kong, you'll need a development installation. The next branch holds the latest unreleased source code.

You can read more about writing your own plugins in the Plugin Development Guide, or browse an online version of Kong's source code documentation in the Public Lua API Reference.

Vagrant

You can use a Vagrant box running Kong and Cassandra that you can find at Mashape/kong-vagrant.

Source Install

First, you will need to already have Kong installed. Install Kong by following one of the methods described at getkong.org/download. Then, make sure you have downloaded Cassandra and that it is running. These steps will override your Kong installation with the latest source code:

# clone the repo and use the next branch
$ git clone https://github.com/Mashape/kong
$ cd kong/
$ git checkout next

# Build and install Kong globally using Luarocks, overriding the version previously installed
$ [sudo] make install

# Install all development dependencies and create your environment configuration files
$ make dev

# Finally, run Kong with the just created development configuration
$ kong start -c kong_DEVELOPMENT.yml

The lua_package_path directive in the configuration specifies that the Lua code in your local folder will be used in favor of the system installation. The lua_code_cache directive being turned off, you can start Kong, edit your local files, and test your code without restarting Kong.

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)
restart Restart 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

Enterprise Support

Support, Demo, Training, API Certifications and Consulting available at http://getkong.org/enterprise.

License

Copyright 2015 Mashape, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

kong's People

Contributors

thibaultcha avatar subnetmarco avatar sonicaghi avatar rainum avatar nijikokun avatar tieske avatar shashiranjan84 avatar mashapedeployment avatar lookfirst avatar tamizhgeek avatar ajayk avatar ybv avatar wpjunior avatar gitter-badger avatar cyexy avatar rafael avatar lewisjellis avatar kennethklee avatar jmuthspringer avatar gjedeer avatar christopherbiscardi avatar

Stargazers

Kevin Hatfield avatar

Watchers

sky avatar  avatar

Forkers

cloudxtreme

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.