Kong是在客户端和(微)服务间转发API通信的API网关,通过插件扩展功能。Kong有两个主要组件:
- Kong Server :基于nginx的服务器,用来接收API请求。
- Apache Cassandra :用来存储操作数据。
你可以通过增加更多Kong Server机器对Kong服务进行水平扩展,通过前置的负载均衡器向这些机器分发请求。根据文档描述,两个Cassandra节点就足以支撑绝大多数情况,但如果网络非常拥挤,可以考虑适当增加更多节点。
对于开源社区来说,Kong 中最诱人的一个特性是可以通过插件扩展已有功能,这些插件在 API 请求响应循环的生命周期中被执行。插件使用 Lua 编写,而且 Kong 还有如下几个基础功能:
- HTTP 基本认证
- 密钥认证
- CORS( Cross-origin Resource Sharing,跨域资源共享)
- TCP/UDP
- 文件日志
- API 请求限流
- 请求转发
- nginx 监控
更新日志
新增
- Support for a simple slash in
request_path
. #1227 - Plugins:
- Response Rate Limiting: it now appends usage headers to the upstream requests in the form of
X-Ratelimit-Remaining-{limit_name}
and introduces a new config.block_on_first_violation
property. #1235
改进
- Plugins:
- Mashape Analytics: The plugin is now called "Galileo", and added support for Galileo v3.#1159
bug修复
- Postgres now relies on the
search_path
configured on the database and its default value $user, public
. #1196 - Kong now properly encodes an empty querystring parameter like
?param=
when proxying the request. #1210 - The configuration now checks that
cluster.ttl_on_failure
is at least 60 seconds. #1199 - Plugins:
- Loggly: Fixed an issue that was triggering 400 and 500 errors. #1184
- JWT: The
TYP
value in the header is not optional and case-insensitive. #1192 - Request Transformer: Fixed a bug when transforming request headers. #1202
- OAuth 2.0: Multiple redirect URIs are now supported. #1112
- IP Restriction: Fixed that prevented the plugin for working properly when added on an API.#1245
- CORS: Fixed an issue when
config.preflight_continue
was enabled. #1240
下载