kong-网络与防火墙

端口

kong 通过多个链接实现不同的目录:

  • 代理
  • 管理api
  • 集群
Overview of ports and connections.png

代理

kong通过nginx做前端代理处理流入的数据流:

  • 8000 做HTTP代理端口,可以在配置文件配置proxy_listen修改端口
  • 8443 做HTTPS代理端口,通过proxy_listen_ssl 修改端口

管理API

  • 8001 端口,通过改端口管理API,应该通过防火墙限制未授权访问,通过admin_api_listen配置项修改

集群

  • 7373 端口,kong通过该端口与本地的集群代理连接,通过cluster_listen_rpc配置项修改,该端口只是本地使用,并不需要暴露出去
  • 7946 端口,kong用于集群节点之间的链接,该端口上UDP、TCP协议的流量都应该允许通过,参考cluster_listencluster_advertise配置项,该端口应该只对节点开放。
intra-node port settings.png

配置实例

假如某节点本地集群端口侦听在 192.168.23.45:7946 端口,然后通过NAT映射到 192.168.10.5:17946 ip端口,那么对应的配置项应该如下:

  • cluster_advertise=192.168.10.5:17946
  • cluster_listen=192.168.23.45:7946

防火墙

Below are the recommended firewall settings:
The upstream APIs behind Kong will be available on proxy_listen and proxy_listen_ssl. Configure these ports accordingly to the access level you wish to grant to the upstream APIs.
Protect admin_api_listen, and only allow trusted sources that can access the Admin API.
Allow traffic on the cluster_listen and cluster_advertise portsonly between the Kong nodes. This port is used for intra-cluster communications.

Network

Kong assumes a flat network topology in multi-datacenter setups. If you have a multi-datacenter setup, Kong nodes between the datacenters should communicate over a VPN connection.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • from http://www.infoq.com/cn/articles/etcd-interpretation...
    小树苗苗阅读 13,998评论 3 38
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,991评论 19 139
  • JBoss AS7集群方案...2 基础环境搭建...2 安装jdk.3 AS7安装、配置3 AS7群集配置、测试...
    lannerate阅读 2,887评论 0 1
  • Codis 3.2 部署配置汇总 概念总结 集群配置前需要了解架构,集群分片主要分三种: 客户端分片:这个需要自己...
    三杯水Plus阅读 6,072评论 0 11
  • 你不知道 你是怎么来到这个世界 你不知道 世界会不会欢迎你的来到 你不知道 自己有没有选择的权利 你不知道 有没有...
    布老头和他的家人们阅读 227评论 9 0