Kong Gateway Introduction and installation of the small note

Source: Internet
Author: User
Tags cassandra

This article is mainly for the Kong installation of the small note, the system environment for CentOS 6.7

Please specify the source--xiaoeight the article reproduced

    • Introduced

Kong is an API gateway that forwards API traffic between the client and (micro) services, extending functionality through plug-ins. There are two main components of Kong:

Kong Server: Nginx-based server used to receive API requests.
Apache Cassandra: Used to store operational data.

In general, the API and the client directly introduce a layer of gate ways, in this layer above the various articles, such as authorization, current limit, monitoring and logging, if there is a need or interest in the crossing can continue to ↓↓↓↓↓↓↓↓↓↓

Kong official website

For core functionality considerations, you can forward restful requests including WebService, get, post, etc. (just list the tests that have been tested, and you can continue to test your needs and inform them);

For plug-in features, there are a variety of plug-ins including HTTP Basic authentication, key authentication, CORS (Cross-origin Resource sharing, cross-domain resource sharing), TCP, UDP, file log, API request current limit, request forwarding and nginx monitoring;

For load considerations, the Kong service can be scaled horizontally by adding more Kong Server machines, distributing requests to these machines through a pre-built load balancer. According to the documentation, two Cassandra nodes are sufficient to support most cases, but if the network is congested, consider adding more nodes appropriately.

    • Installation

Follow up on the installation process, and where you need to be aware during the installation process. First of all to note that the introduction has already mentioned that Kong is actually two parts of the Kong server is the code that everyone gets on git, and the other part is the DB part such as Cassandra

Installation:
    1. Install the package:

      After downloading the package, execute:

      $ sudo yum install epel-release$ sudo yum install kong-0.8.1.*.noarch.rpm --nogpgcheck
    2. Configure your database

      Configure Kong So it can connect to your database. Kong supports both PostgreSQL 9.4+ Andcassandra 2.2.x as its datastore.

    3. Start Kong:

      $ kong start# Kong is running$ curl 127.0.0.1:8001
The above is the official installation guide the following is the actual installation process, due to the initial failure to pay attention to the official installation instructions, there are two problems during the installation process. (1.rpm not downloaded 2.cassandra for installation run) 1. The actual use of the process in the "official-1"
sudo yum install kong-0.8.1.*.noarch.rpm --nogpgcheck
If the prompt error can not install, then the description may be the same as the small eight, the following way can be resolved (the problem is because there is no download of the corresponding RPM file, then the error is ...) A. Obtaining kong-0.8.1.el6.noarch.rpm in https://getkong.org/install/centos/b. Download the kong-0.8.1.el6.noarch.rpm file to CentOS (in the new folder, Kong) in CentOS via the address obtained in wget and 1 C. RPM-IVH kong-0.8.1.el6.noarch.rpm But the process reported a dependency problem d. But after re-executing sudo yum install kong-0.8.1.*.noarch.rpm--nogpgcheck installation is normal 2.       The actual use of the process, if skip 2 into 3 directly will be error, according to the prompt content can be seen as a DB problem, the installation of Db-->cassandra when the default configuration (if you modify the port configuration or other need to pay attention to the corresponding configuration in Kong needs to be modified), that is, "official 2" caused A. Download the DB that is required to use the http://cassandra.apache.org/download/download apache-cassandra-2.2.6-bin.tar.gz ( Apache-cassandra-3.5-bin.tar.gz need jdk1.8 support) b. Start the Cassandra CD to the extracted Bin folder to execute./cassandra-f 3. Start Kong for Cassandra after start up Kon G when the case for the start Kong success here to explain, Kong has two main ports one for the management port 8001, and the other is to provide gateway access to the 8000-port specific test can refer to the official Website Quick Guide Test http://your machine or the domain name of the binding £ º 8000 X-host-override:test.com to this has completed the full deployment of the Kong installation process, if the simple use has been fully able to ........ ...... But how can a lazy man like a little eight endure a bunch of curl orders? To is continue! Trailer Kong management UI which strong? For:Kong-dashboard(Why is this color???)

Kong Gateway Introduction and installation of the small note

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.