Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: removed router r3. #725

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ addons:
- cpanminus
- build-essential
- libncurses5-dev
- libpcre3-dev
- libreadline-dev
- libssl-dev
- perl
Expand Down
1 change: 0 additions & 1 deletion .travis/linux_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export_or_prefix() {

create_lua_deps() {
WITHOUT_DASHBOARD=1 sudo luarocks make --lua-dir=${OPENRESTY_PREFIX}/luajit rockspec/apisix-master-0.rockspec --tree=deps --only-deps --local
sudo luarocks install --lua-dir=${OPENRESTY_PREFIX}/luajit lua-resty-libr3 --tree=deps --local
echo "Create lua deps cache"
sudo rm -rf build-cache/deps
sudo cp -r deps build-cache/
Expand Down
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ ifeq ($(lj-releng-exist), not_exist)
chmod a+x utils/lj-releng
endif

### dev_r3: Create a development ENV for r3
.PHONY: dev_r3
dev_r3:
ifeq ($(UNAME),Darwin)
luarocks install --lua-dir=$(LUA_JIT_DIR) lua-resty-libr3 --tree=deps --local
else ifneq ($(LUAROCKS_VER),'luarocks 3.')
luarocks install lua-resty-libr3 --tree=deps --local
else
luarocks install --lua-dir=/usr/local/openresty/luajit lua-resty-libr3 --tree=deps --local
endif


### check: Check Lua source code
.PHONY: check
Expand Down
6 changes: 1 addition & 5 deletions conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ apisix:
router:
http: 'radixtree_uri' # radixtree_uri: match route by uri(base on radixtree)
# radixtree_host_uri: match route by host + uri(base on radixtree)
# r3_uri: match route by uri(base on r3)
# r3_host_uri: match route by host + uri(base on r3)

ssl: 'radixtree_sni' # r3_sni: match route by SNI(base on r3)
# radixtree_sni: match route by SNI(base on radixtree)
ssl: 'radixtree_sni' # radixtree_sni: match route by SNI(base on radixtree)
# stream_proxy: # TCP/UDP proxy
# tcp: # TCP proxy port list
# - 9100
Expand Down
6 changes: 2 additions & 4 deletions doc/architecture-design-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,15 @@ APISIX 区别于其他 API 网关的一大特点是允许用户选择不同 Rout
在本地配置 `conf/config.yaml` 中设置最符合自身业务需求的路由。

* `apisix.router.http`: HTTP 请求路由。
* `radixtree_uri`: (默认)只使用 `uri` 作为主索引。基于 `radix tree` 引擎,支持全量和深前缀匹配,更多见 [如何使用 router-radixtree](router-radixtree.md)。
* `radixtree_uri`: (默认)只使用 `uri` 作为主索引。基于 `radixtree` 引擎,支持全量和深前缀匹配,更多见 [如何使用 router-radixtree](router-radixtree.md)。
* `绝对匹配`:完整匹配给定的 `uri` ,比如 `/foo/bar`,`/foo/glo`。
* `前缀匹配`:末尾使用 `*` 代表给定的 `uri` 是前缀匹配。比如 `/foo*`,则允许匹配 `/foo/`、`/foo/a`和`/foo/b`等。
* `匹配优先级`:优先尝试绝对匹配,若无法命中绝对匹配,再尝试前缀匹配。
* `任意过滤属性`:允许指定任何 Ningx 内置变量作为过滤条件,比如 uri 请求参数、请求头、cookie 等。
* `r3_uri`: 只使用 `uri` 作为主索引(基于 r3 引擎)。基于 `r3` 的 trie tree 是支持正则匹配的,比如 `/foo/{:\w+}/{:\w+}`,更多见 [如何使用 router-r3](router-r3.md)。
* `r3_host_uri`: 使用 `host + uri` 作为主索引(基于 r3 引擎),对当前请求会同时匹配 host 和 uri。
* `radixtree_host_uri`: 使用 `host + uri` 作为主索引(基于 `radixtree` 引擎),对当前请求会同时匹配 host 和 uri,支持的匹配条件与 `radixtree_uri` 基本一致。

* `apisix.router.ssl`: SSL 加载匹配路由。
* `radixtree_sni`: (默认)使用 `SNI` (Server Name Indication) 作为主索引(基于 radixtree 引擎)。
* `r3_sni`: 使用 `SNI` (Server Name Indication) 作为主索引(基于 r3 引擎)。

[返回目录](#目录)

Expand Down
6 changes: 2 additions & 4 deletions doc/architecture-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,15 @@ A distinguishing feature of APISIX from other API gateways is that it allows use
Set the route that best suits your business needs in the local configuration `conf/config.yaml`.

* `apisix.router.http`: HTTP Request Route。
* `radixtree_uri`: (Default) only use `uri` as the primary index. Support for full and deep prefix matching based on the `radix tree` engine, see [How to use router-radixtree](router-radixtree.md).
* `radixtree_uri`: (Default) only use `uri` as the primary index. Support for full and deep prefix matching based on the `radixtree` engine, see [How to use router-radixtree](router-radixtree.md).
* `Absolute match `: Complete match for the given `uri` , such as `/foo/bar`,`/foo/glo`.
* `Prefix match`: Use `*` at the end to represent the given `uri` as a prefix match. For example, `/foo*` allows matching `/foo/`, `/foo/a` and `/foo/b`.
* `match priority`: first try absolute match, if you can't hit absolute match, try prefix match.
* `Any filter attribute`: Allows you to specify any Ningx built-in variable as a filter, such as uri request parameters, request headers, cookies, and so on.
* `r3_uri`: Use only `uri` as the primary index (based on the r3 engine). The trie tree based on `r3` supports regular matching, such as `/foo/{:\w+}/{:\w+}`, see [How to use router-r3](router-r3.md).
* `r3_host_uri`: Use `host + uri` as the primary index (based on the r3 engine), matching both host and uri for the current request.
* `radixtree_host_uri`: Use `host + uri` as the primary index (based on the `radixtree` engine), matching both host and uri for the current request.

* `apisix.router.ssl`: SSL loads the matching route.
* `radixtree_sni`: (Default) Use `SNI` (Server Name Indication) as the primary index (based on the radixtree engine).
* `r3_sni`: Use `SNI` (Server Name Indication) as the primary index (based on the r3 engine).

[Back to top](#Table-of-contents)

Expand Down
1 change: 0 additions & 1 deletion doc/dev-manual-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ Makefile rules:

help: Show Makefile rules.
dev: Create a development ENV
dev_r3: Create a development ENV for r3
check: Check Lua source code
init: Initialize the runtime environment
run: Start the apisix server
Expand Down
1 change: 0 additions & 1 deletion doc/dev-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ Makefile rules:

help: Show Makefile rules.
dev: Create a development ENV
dev_r3: Create a development ENV for r3
check: Check Lua source code
init: Initialize the runtime environment
run: Start the apisix server
Expand Down
1 change: 0 additions & 1 deletion doc/doc-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Reference document
* [Health Check](health-check.md): Enable health check on the upstream node, and will automatically filter unhealthy nodes during load balancing to ensure system stability.
* Router
* [radixtree](router-radixtree.md)
* [r3](router-r3.md)
* [Stand Alone Model](stand-alone.md): Supports to load route rules from local yaml file, it is more friendly such as under the kubernetes(k8s).
* [Stream Proxy](stream-proxy.md)
* [Admin API](admin-api-cn.md)
Expand Down
2 changes: 1 addition & 1 deletion doc/install-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CentOS 6

TODO

Failed to compile `rapidjson`, and the compilation of `libr3` relies on later versions of `autoconf` and `pcre`, but the CentOS 6 comes with a lower version, will support CentOS 6 later.
Failed to compile `rapidjson`, but the CentOS 6 comes with a lower version, will support CentOS 6 later.

Mac OSX
=======
Expand Down
55 changes: 0 additions & 55 deletions doc/router-r3.md

This file was deleted.

159 changes: 0 additions & 159 deletions lua/apisix/http/router/r3_host_uri.lua

This file was deleted.

Loading