Kong?v0.9.0 RC1 發布

jopen 8年前發布 | 8K 次閱讀 kong API通信 網關 Lua Apache Cassandra Nginx

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 監控

更新日志

  • New CLI, with new commands and refined arguments. This new CLI uses the resty-cliinterpreter (see lua-resty-cli) instead of LuaJIT. As a result, the resty executable must be available in your $PATH (resty-cli is shipped in the OpenResty bundle) as well as the bin/kong executable. Kong does not rely on Luarocks installing the bin/kong executable anymore. This change of behavior is taken care of if you are using one of the official Kong packages.
  • Kong uses a new configuration file, with an easier syntax than the previous YAML file.
  • New arguments for the CLI, such as verbose, debug and tracing flags. We also avoid requiring the configuration file as an argument to each command as per the previous CLI.
  • Customization of the Nginx configuration can now be taken care of using two different approaches: with a custom Nginx configuration template and using kong start --template <file>, or by usingkong compile to generate the Kong Nginx sub-configuration, and include it in a custom Nginx instance.

新增

  • Support for overriding configuration settings with environment variables.
  • Support for SSL connections between Kong and PostgreSQL. #1425
  • Ability to apply plugins with more granularity: per-consumer, and global plugins are now possible. #1403
  • New kong check command: validates a Kong configuration file.
  • Better version check for third-party dependencies (OpenResty, Serf, dnsmasq). #1307
  • Ability to configure the validation depth of database SSL certificates from the configuration file.#1420
  • request_host: internationalized url support; utf-8 domain names through punycode support and paths through %-encoding. #1300
  • Implements caching locks when fetching database configuration (APIs, Plugins...) to avoid dog pile effect on cold nodes. #1402
  • Plugins:
    • Bot Detection: Added a new plugin that protects APIs by detecting common bots and crawlers.#1413
    • correlation-id: new "tracker" generator, identifying requests per worker and connection. #1288
    • request/response-transformer: ability to add strings including colon characters. #1353

問題修復

  • Sensitive configuration settings are not printed to stdout anymore. #1256
  • Fixed bug that caused nodes to remove themselves from the database when they attempted to join the cluster. #1437
  • Plugins:
    • request-size-limiting: use proper constant for MB units while setting the size limit. #1416
    • OAuth2: security and config validation fixes. #1409 #1112
    • request/response-transformer: better validation of fields provided without a value. #1399
    • JWT: handle some edge-cases that could result in HTTP 500 errors. #1362

internal

  • new test suite using resty-cli and removing the need to monkey-patch the ngx global.
  • custom assertions and new helper methods (wait_until()) to gracefully fail in case of timeout.
  • increase atomicity of the testing environment.
  • lighter testing instance, only running 1 worker and not using dnsmasq by default.

下載

 

 

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!