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

update FAQ, add one about slow luarocks #813

Merged
merged 3 commits into from
Nov 9, 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
4 changes: 2 additions & 2 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- :sunrise: **[支持 stream 代理](https://github.com/apache/incubator-apisix/blob/master/doc/stream-proxy-cn.md)**. [#513](https://github.com/apache/incubator-apisix/pull/513)
- :sunrise: 支持[在 consumer 上绑定插件](https://github.com/apache/incubator-apisix/blob/master/doc/architecture-design-cn.md#consumer). [#544](https://github.com/apache/incubator-apisix/pull/544)
- 上游增加对域名的支持,而不仅是 IP。[#522](https://github.com/apache/incubator-apisix/pull/522)
- 当上游节点的权重为 0 是自动忽略。[#536](https://github.com/apache/incubator-apisix/pull/536)
- 当上游节点的权重为 0 时自动忽略。[#536](https://github.com/apache/incubator-apisix/pull/536)

### Plugins
- :sunrise: **[MQTT 代理](https://github.com/apache/incubator-apisix/blob/master/doc/plugins/mqtt-proxy-cn.md)**: 支持用 `client_id` 对 MQTT 进行负载均衡,同时支持 MQTT 3.1 和 5.0 两个协议标准。 [#513](https://github.com/apache/incubator-apisix/pull/513)
Expand All @@ -54,7 +54,7 @@


### Bugfix
- 健康检查: 修复在多 worker 下运行的话,健康检查 checker 的名字错误。 [#568](https://github.com/apache/incubator-apisix/issues/568)
- 健康检查: 修复在多 worker 下运行时健康检查 checker 的名字错误。 [#568](https://github.com/apache/incubator-apisix/issues/568)

### Dependencies
- 把 `lua-tinyyaml` 从源码中移除,通过 Luarocks 来安装。
Expand Down
12 changes: 12 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,15 @@ For the configuration center, configuration storage is only the most basic funct
5. High Performance

See more [etcd why](https://github.com/etcd-io/etcd/blob/master/Documentation/learning/why.md#comparison-chart).

## Why is it that installing APISIX dependencies with Luarocks causes timeout, slow or unsuccessful installation?

There are two possibilities when encountering slow luarocks:

1. Server used for luarocks installation is blocked
2. There is a place between your network and github server to block the 'git' protocol

For the first problem, you can use https_proxy or use the `--server` option to specify a luarocks server that you can access or access faster.
Run the `luarocks config rocks_servers` command(this command is supported after luarocks 3.0) to see which server are available.

If using a proxy doesn't solve this problem, you can add `--verbose` option during installation to see exactly how slow it is. Excluding the first case, only the second that the `git` protocol is blocked. Then we can run `git config --global url."https://".insteadOf git://` to using the 'HTTPS' protocol instead of `git`.
14 changes: 14 additions & 0 deletions FAQ_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ APISIX 是当前性能最好的 API 网关,单核 QPS 达到 2.3 万,平均
5. 高性能

APISIX 需要一个配置中心,上面提到的很多功能是传统关系型数据库和KV数据库是无法提供的。与 etcd 同类软件还有 Consul、ZooKeeper等,更详细比较可以参考这里:[etcd why](https://github.com/etcd-io/etcd/blob/master/Documentation/learning/why.md#comparison-chart),在将来也许会支持其他配置存储方案。

## 为什么在用 Luarocks 安装 APISIX 依赖时会遇到超时,很慢或者不成功的情况?

遇到 luarocks 慢的问题,有以下两种可能:

1. luarocks 安装所使用的服务器不能访问
2. 你所在的网络到 github 服务器之间有地方对 `git` 协议进行封锁

针对第一个问题,你可以使用 https_proxy 或者使用 `--server` 选项来指定一个你可以访问或者访问更快的
luarocks 服务。 运行 `luarocks config rocks_servers` 命令(这个命令在 luarocks 3.0 版本后开始支持)
可以查看有哪些可用服务。

如果使用代理仍然解决不了这个问题,那可以在安装的过程中添加 `--verbose` 选项来查看具体是慢在什么地方。排除前面的
第一种情况,只可能是第二种,`git` 协议被封。这个时候可以执行 `git config --global url."https://".insteadOf git://` 命令使用 `https` 协议替代。
2 changes: 1 addition & 1 deletion bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ local function init()
with_module_status = false
end

-- -- Using template.render
-- Using template.render
local sys_conf = {
lua_path = package.path,
lua_cpath = package.cpath,
Expand Down