Skip to content

Commit 9143d66

Browse files
authored
docs: add APISIX 2.12.0 Release Blog (#859)
1 parent 0264716 commit 9143d66

File tree

2 files changed

+410
-0
lines changed

2 files changed

+410
-0
lines changed
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
title: "Apache APISIX 2.12.0 is Released, More Features Coming!"
3+
authors:
4+
- name: "Zexuan Luo"
5+
title: "Author"
6+
url: "https://github.com/spacewander"
7+
image_url: "https://avatars.githubusercontent.com/u/4161644?v=4"
8+
- name: "Sylvia"
9+
title: "Technical Writer"
10+
url: "https://github.com/SylviaBABY"
11+
image_url: "https://avatars.githubusercontent.com/u/39793568?v=4"
12+
keywords:
13+
- Apache APISIX
14+
- 2.12.0
15+
- Release
16+
- Serverless
17+
- Plugin
18+
description: Following the release of version 2.11.0, Apache APISIX will also bring you the first version with new features in 2022 during the upcoming Spring Festival.
19+
tags: [Release,Technology,Ecosystem]
20+
---
21+
22+
> Following the release of version 2.11.0, Apache APISIX will also bring you the first version with new features in 2022 during the upcoming Spring Festival.
23+
24+
<!--truncate-->
25+
26+
## New Feature: More Serverless Integrations
27+
28+
Remember that in the last release, Apache APISIX added support for Azure Function. This new version is also full of intention, adding support for more Serverless vendors in the feature set.
29+
30+
Users can now also combine AWS Lambda and Apache OpenWhisk in Apache APISIX to expose specific functions on the gateway.
31+
32+
## New features: More Forensic Plugins
33+
34+
This new release also brings two new plugins that we've been waiting for: `forward-auth` and `opa`.
35+
36+
- The `forward-auth` plugin is similar to Traefik's plugin of the same name, which allows sending the information of the current request to an external service for authentication.
37+
- The `opa` plugin integrates with the well-known Open Policy Agent, which can perform complex authentication functions via OPA.
38+
39+
These two plugins will add to the forensic functionality of Apache APISIX, giving users richer and easier forensic operations.
40+
41+
## New features: More Logging Features
42+
43+
In addition to the forensic plugins mentioned above, this new release will also bring three new logging plugins: `google-cloud-logging`, `splunk-hec-logging` and `rocketmq-logger`.
44+
45+
In the future, Apache APISIX will connect to more and more logging service providers and open source brokers to make logging easier.
46+
47+
### Support for logging response bodies
48+
49+
The 2.12.0 release also supports logging of response bodies at the logging level. As with other Apache APISIX features, this feature can be enabled dynamically via expressions. This makes it possible to log only when a specific Content-Type and Content-Length is returned upstream, without having to worry about the problems associated with full response body collection.
50+
51+
An example can be found below.
52+
53+
```json
54+
{
55+
"plugins": {
56+
"kafka-logger": {
57+
"broker_list" : {
58+
"127.0.0.1":9092
59+
},
60+
"kafka_topic" : "test2",
61+
"include_resp_body": true,
62+
"include_resp_body_expr": [
63+
[
64+
"sent_http_content_length",
65+
"<",
66+
"4096"
67+
],
68+
[
69+
"sent_http_content_type",
70+
"==",
71+
"application/json"
72+
],
73+
]
74+
}
75+
},
76+
"upstream": {
77+
"nodes": {
78+
"127.0.0.1:1980": 1
79+
},
80+
"type": "roundrobin"
81+
},
82+
"uri": "/hello"
83+
}
84+
```
85+
86+
> The above configuration will log only when Content-Length < 4096 and Content-Type is "application/json".
87+
88+
### Support for registering custom variables
89+
90+
Another feature closely related to logging is that the new version of Apache APISIX now supports registration of custom variables. Combined with APISIX's custom logging format, it is possible to fully customize the reported log content. This means that log generation and reporting can be decoupled without modifying specific logging plugins. Here is a simple demonstration with an example.
91+
92+
For example, we can register a variable a6_route_labels in our own plug-in.
93+
94+
```c
95+
local core = require "apisix.core"
96+
97+
core.ctx.register_var("a6_route_labels", function(ctx)
98+
local route = ctx.matched_route and ctx.matched_route.value
99+
if route and route.labels then
100+
return route.labels
101+
end
102+
return nil
103+
end)
104+
```
105+
106+
And use it in a custom log format.
107+
108+
```json
109+
{
110+
"log_format": {
111+
"host": "$host",
112+
"labels": "$a6_route_labels",
113+
"client_ip": "$remote_addr"
114+
}
115+
}
116+
```
117+
118+
Suppose our Route looks like this.
119+
120+
```json
121+
{
122+
"plugins": {
123+
"http-logger": {
124+
"uri": "http://127.0.0.1:1980/log",
125+
"batch_max_size": 1,
126+
"concat_method": "json"
127+
}
128+
},
129+
"upstream": {
130+
"nodes": {
131+
"127.0.0.1:1982": 1
132+
},
133+
"type": "roundrobin"
134+
},
135+
"labels": {
136+
"k": "v"
137+
},
138+
"uri": "/hello"
139+
}
140+
```
141+
142+
Eventually you will receive the log as shown below.
143+
144+
```
145+
{"client_ip":"127.0.0.1","host":"localhost","labels":{"k":"v"},"route_id":"1"}
146+
```
147+
148+
## New: L4 Proxy Support for TLS over TCP Upstream
149+
150+
With the new Upstream Scheme introduced in version 2.12.0, Apache APISIX now supports proxying to TLS over TCP.
151+
152+
See below for details, just specify Scheme as TLS in the Upstream configuration.
153+
154+
```json
155+
{
156+
"scheme": "tls",
157+
"nodes": {
158+
"127.0.0.1:1995": 1
159+
},
160+
"type": "roundrobin"
161+
}
162+
```
163+
164+
The TCP proxy feature of Apache APISIX is now fully supported by TLS. In addition, we also support configuring the Access Log of the L4 proxy in a static file.
165+
166+
```
167+
stream:
168+
enable_access_log: false # enable access log or not, default false
169+
access_log: logs/access_stream.log
170+
access_log_format: "$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time"
171+
# create your custom log format by visiting http://nginx.org/en/docs/varindex.html
172+
access_log_format_escape: default # allows setting json or default characters escaping in variables
173+
```
174+
175+
## Update: Multi-language plug-ins continue to improve
176+
177+
### WASM ecosystem is more feature-rich
178+
179+
In previous releases, Apache APISIX has opened up support for the WASM ecosystem. In version 2.12.0, a number of details have been updated for the WASM ecosystem.
180+
181+
Apache APISIX now supports running WASM code at the header_filter stage, making up for the fact that existing external plugins cannot modify the response.
182+
183+
In addition, we also support HTTP communication inside WASM through Apache APISIX as a host. With this feature, we have also re-implemented the forward-auth plugin with WASM. The functionality of the plugin is almost identical to the Lua version, and even the test cases pass with a name change from the Lua version.
184+
185+
### Java Plugin Runner latest version released
186+
187+
Of course, we haven't forgotten to update for existing external plugins, and with this 2.12.0 release, Apache APISIX now allows external plugins to fetch request bodies.
188+
189+
For example, the recent release of Java Plugin Runner version 2 includes this feature. The new version of the Java Plugin Runner also supports dynamic fetching of APISIX variables at runtime.
190+
191+
## More details
192+
193+
In addition to the new features and components mentioned above, Apache APISIX version 2.12.0 has been updated with the following features.
194+
195+
- gRPC-Web support: After gRPC proxies and HTTP to gRPC, we welcome the third member of the gRPC family. Apache APISIX now also supports the proxy gRPC Web protocol.
196+
- `limit-count` enhancements: The `limit-count` plugin now supports sharing of counters between requests and routes, which is quite flexible.
197+
198+
More details about the Apache APISIX 2.12.0 update can be found in the [Change log](https://github.com/apache/apisix/blob/release/2.12/CHANGELOG.md#2120) corresponding to this release.
199+
200+
## Download
201+
202+
To obtain the latest version of Apache APISIX 2.12.0, you can download it via the following path.
203+
204+
- Source code: Please visit [Download page](https://apisix.apache.org/downloads/)
205+
- Binary installation package: Please visit [Installation Guide](https://apisix.apache.org/zh/docs/apisix/how-to-build/)

0 commit comments

Comments
 (0)