Kong 1.2 Released! Major Performance Improvements and Newly Open Sourced Plugins
Kong 1.2 Released with Major Performance Improvements and Newly Open Sourced Plugins!
Today, we’re excited to unveil the latest release of our flagship open source offering – Kong 1.2! In this release, we’ve made key latency and throughput performance improvements and open sourced some previously enterprise-only plugins to enhance your overall Kong experience. In addition, our team of engineers and community have implemented numerous small fixes and improvements to expand on the Declarative Config and DB-less deployment capabilities we released in Kong 1.1 in March.
Read on below to learn more about Kong 1.2’s new features, improvements and bug fixes, and how they’ll help you better scale and manage your Kong deployment. As always, be sure to check out our Changelog to get the full details.
Core Performance Improvements
To ensure that our users get the best possible performance, we’ve made big improvements to Kong’s underlying runtime in terms of latency and throughput performance.
Below, we’ve provided some test results, which display these improvements in action. All tests were run on a c1.small.x86 bare-metal instance on Packet. For more details on the four test case scenarios, you can check out the script here.
- Better Throughput Performance
- Testing throughput for Kong 1.2 demonstrates markedly better performance across all four scenarios.
- Substantial improvements were made to plugin management: In adding extra plugin overhead to our services, in Kong 1.1 we observe an adverse impact of 14% in throughput; in Kong 1.2 the impact is only 7.9% – an improvement of 56%.
- 2x Throughput Improvement In Stress Test Scenario
- To measure the impact of rebuilding the internal router object on throughput, we ran a route creation stress test – inserting 500 routes and plugins via the Admin API port in parallel to exercising the Proxy port using wrk. With Kong 1.2.0 in eventually consistent mode, the impact was only 11% versus 50% in Kong 1.1.2
- Given the overall baseline throughput improvement in Kong 1.2.0, running Kong 1.2.0 in eventually consistent mode yielded a performance under stress that was comparable to that of Kong 1.1 with no stress applied!
- 10x Better Max Latency In Stress Test Scenario
- Reconfiguring Kong at runtime has a much lower impact in Kong 1.2 than in previous releases, resulting in a 10x lower max latency spike, which yields more predictable performance.
- In Kong 1.2 there are two levels of router consistency available: strict consistency, which gives a routing behavior fully compatible with Kong 1.1 and below, and the new eventually consistent mode, where the reconfiguration is entirely asynchronous, meaning that Kong will continue to use the previous configuration until the new one is fully ready.
- In Kong 1.2, latency improvements are observed even in the strict mode, because it also runs asynchronous updates in the background in addition to the regular synchronous behavior.
Newly Open Sourced Plugins
As part of our ongoing commitment to Kong’s open source community, we’re happy to share that we’ve made more previously enterprise-only plugins available to the community. The proxy cache plugin is now available to all Kong users, The request-transformer plugin now includes capabilities previously only available in Enterprise, among which are templating and variables interpolation!
In Kong 1.2 we’ve made several important additions to improve functionality and ease of use as requested by the community, including:
- Asynchronous router updates: introduce a configuration properties
router_consistency, with two possible values:
eventual. If set to
eventual, router rebuild operations are performed out of the proxy path, asynchronously, reducing P95 latency when performing runtime Services/Routes manipulation.
- Kong can now preload entities at initialization with Cache Warmup. A new configuration directive
db_cache_warmup_entitieswas introduced, allowing users to specify which entities should be preloaded. Cache warmup allows for ahead of time DNS resolution for Services with a hostname. This feature reduces first requests latency, improving P99 latency.
- New optional configuration properties for Postgres concurrency control:
pg_max_concurrent_queriessets the maximum number of concurrent queries to the database;
pg_semaphore_timeoutallows you to tune the timeout for acquiring access to the database connection.
- Support for wildcard SNI matching: the
ssl_certificate_by_luaphase (and stream preread) is now able to match an SNI against any registered wildcard SNI
- HTTPS routes can now be matched by SNI: the
snisroute attribute can now be set for HTTPS routes and is used as a routing attribute
- The loading of declarative configuration is now done atomically, and with a safety check to verify that the new configuration fits in memory
- The status code for HTTPS redirects is now configurable: a new attribute
https_redirect_status_codewas added to Route entities
- Add declarative configuration hash checking, avoiding reloading if the configuration has not changed. The
/configendpoint now accepts a
check_hashquery argument; hash checking only happens if its value is set to
- Entity schema validation endpoints: the new endpoint
/schemas/:entity_name/validatecan be used to validate an instance of any entity type in Kong without creating the entity
- Add memory statistics to the
/statusendpoint. The response now includes a
memoryfield, which contains
workers_lua_vms, with stats on shared dictionaries and workers Lua VM memory usage. Additionally, the endpoint supports two optional query arguments:
unit– the size, and
scale-the number of digits to the right of the decimal points when in the new human-readable memory strings
Other Improvements and Bug Fixes
Kong 1.2 also features several fixes and improvements to the core, CLI, PDK, and plugins. For the full details, check out the Change Log here!
Thank you to our community of users, contributors, and core maintainers for your continuing support of Kong’s open source platform.
Please give Kong 1.2 a try, and be sure to let us know what you think!
As usual, feel free to ask any question on Kong Nation, our Community forum. Learning from your feedback will allow us to better understand the mission-critical use-cases and keep improving Kong.
Download Kong 1.2