Skip to content

Commit 044ffe9

Browse files
authored
docs: minor edits and fix broken links (#145)
1 parent a2f0429 commit 044ffe9

File tree

11 files changed

+29
-26
lines changed

11 files changed

+29
-26
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
.DS_Store
2+
13
/chproxy
24
/tags
35

46
# Documentation dependencies and artefacts
7+
/docs/dist
58
/docs/node_modules
69
/docs/.output
710
/docs/.nuxt

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
# chproxy
66

7-
Chproxy is an http proxy and load balancer for [ClickHouse](https://ClickHouse.yandex) database.
7+
Chproxy is an HTTP proxy and load balancer for the [ClickHouse](https://ClickHouse.yandex) database.
88

9-
Full documentation is available on [the official website](https://www.chproxy.org/)
9+
Full documentation is available on [the official website](https://www.chproxy.org/).

docs/content/cn/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ description: Chproxy is an http proxy and load balancer for ClickHouse
99

1010
# chproxy
1111

12-
Chproxy 是一个用于 [ClickHouse](https://clickhouse.tech) 数据库的 http 代理、负载均衡器。具有以下特性:
12+
Chproxy 是一个用于 [ClickHouse](https://clickhouse.tech) 数据库的 HTTP 代理、负载均衡器。具有以下特性:
1313

1414
* 支持根据输入用户代理请求到多个 `ClickHouse` 集群。比如,把来自 `appserver` 的用户请求代理到 `stats-raw` 集群,把来自 `reportserver` 用户的请求代理到 `stats-aggregate` 集群。
15-
* 支持将输入用户映射到每个 ClickHouse 实际用户,这能够防止暴露 ClickHouse 集群的真实用户名称、密码信息。此外,chrpoxy 还允许映射多个输入用户到某一个单一的 ClickHouse 实际用户。
15+
* 支持将输入用户映射到每个 ClickHouse 实际用户,这能够防止暴露 ClickHouse 集群的真实用户名称、密码信息。此外,chproxy 还允许映射多个输入用户到某一个单一的 ClickHouse 实际用户。
1616
* 支持接收 HTTP 和 HTTPS 请求。
1717
* 支持通过 IP 或 IP 掩码列表限制 HTTP、HTTPS 访问。
1818
* 支持通过 IP 或 IP 掩码列表限制每个用户的访问。
@@ -21,14 +21,14 @@ description: Chproxy is an http proxy and load balancer for ClickHouse
2121
* 支持限制每个用户的请求并发数。
2222
* 所有的限制都可以对每个输入用户、每个集群用户进行设置。
2323
* 支持自动延迟请求,直到满足对用户的限制条件。
24-
* 支持配置每个用户的[响应缓存](#caching)
24+
* 支持配置每个用户的[响应缓存](/configuration/caching)
2525
* 响应缓存具有内建保护功能,可以防止 [惊群效应(thundering herd)](https://en.wikipedia.org/wiki/Cache_stampede),即 dogpile 效应。
2626
* 通过 `least loaded``round robin` 技术实现请求在副本和节点间的均衡负载。
2727
* 支持检查节点健康情况,防止向不健康的节点发送请求。
2828
* 通过 [Let’s Encrypt](https://letsencrypt.org/) 支持 HTTPS 自动签发和更新。
2929
* 可以自行指定选用 HTTP 或 HTTPS 向每个配置的集群代理请求。
3030
* 在将请求代理到 `ClickHouse` 之前,预先将 User-Agent 请求头与远程/本地地址,和输入/输出的用户名进行关联,因此这些信息可以在 [system.query_log.http_user_agent](https://github.com/yandex/ClickHouse/issues/847) 中查询到。
31-
* 暴露各种有用的符合 [prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) 内容格式的[指标(metrics)](#metrics)
31+
* 暴露各种有用的符合 [Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) 内容格式的[指标(metrics)](/configuration/metrics)
3232
* 支持配置热更新,配置变更无需重启 —— 只需向 `chproxy` 进程发送一个 `SIGHUP` 信号即可。
3333
* 易于管理和运行 —— 只需传递一个配置文件路径给 `chproxy` 即可。
3434
* 易于[配置](https://github.com/ContentSquare/chproxy/blob/master/config/examples/simple.yml):
@@ -58,7 +58,7 @@ clusters:
5858

5959
可以从[此处](https://github.com/ContentSquare/chproxy/releases)下载预编译的 `chproxy` 二进制文件。
6060

61-
只需要下载最新的稳定版二进制文件,解压使用所需要的[配置](#configuration)运行。
61+
只需要下载最新的稳定版二进制文件,解压使用所需要的[配置](/configuration/default)运行。
6262

6363
```
6464
./chproxy -config=/path/to/config.yml
@@ -161,7 +161,7 @@ clusters:
161161
162162
### 通过 HTTPS 进行用户密码认证
163163
164-
假如你需要设置用户名称/密码用于在任何地方访问 `ClickHouse` 集群,可能用于在 [ClickHouse-grafana](https://github.com/ContentSquare/ClickHouse-grafana) 或 [tabix](https://tabix.io/) 创建图形界面管理。通过不信任的网络传输为加密的密码和数据,是一个坏主意。因此在这种情况下,必须通过 HTTPS 访问集群。
164+
假如你需要设置用户名称/密码用于在任何地方访问 `ClickHouse` 集群,可能用于在 [ClickHouse-grafana](https://github.com/ContentSquare/ClickHouse-grafana) 或 [Tabix](https://tabix.io/) 创建图形界面管理。通过不信任的网络传输为加密的密码和数据,是一个坏主意。因此在这种情况下,必须通过 HTTPS 访问集群。
165165

166166
以下的 `chproxy` 配置示例演示了 [HTTPS 配置](https://github.com/ContentSquare/chproxy/blob/master/config/examples/https.yml):
167167

@@ -636,7 +636,7 @@ clusters:
636636
#### 完整的配置规范请参考[这里](https://github.com/ContentSquare/chproxy/blob/master/config)
637637
638638
## 指标
639-
所有的指标都以 prometheus 文本格式暴露在 `/metrics` 路径上。
639+
所有的指标都以 Prometheus 文本格式暴露在 `/metrics` 路径上。
640640

641641
| Name | Type | Description | Labels |
642642
| ------------- | ------------- | ------------- | ------------- |
@@ -655,7 +655,7 @@ clusters:
655655
| host_health | Gauge | Health state of hosts by clusters | `cluster`, `replica`, `cluster_node` |
656656
| host_penalties_total | Counter | The number of given penalties by host | `cluster`, `replica`, `cluster_node` |
657657
| killed_request_total | Counter | The number of requests killed by proxy | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
658-
| proxied_response_duration_seconds | Summary | Duration for responses proxied from clickhouse | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
658+
| proxied_response_duration_seconds | Summary | Duration for responses proxied from ClickHouse | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
659659
| request_body_bytes_total | Counter | The amount of bytes read from request bodies | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
660660
| request_duration_seconds | Summary | Request duration. Includes possible queue wait time | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
661661
| request_queue_size | Gauge | Request queue size at the moment | `user`, `cluster`, `cluster_user` |

docs/content/en/configuration/caching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Two types of cache configuration are supported:
2424

2525
#### Local cache
2626
Local cache is stored on machine's file system. Therefore it is suitable for single replica deployments.
27-
Configuration template for local cache can be found [here](https://github.com/ContentSquare/chproxy/blob/master/config/#file_system_cache_config)
27+
Configuration template for local cache can be found [here](https://github.com/ContentSquare/chproxy/blob/master/config/#file_system_cache_config).
2828

2929
#### Distributed cache
3030
Distributed cache relies on external database to share cache across multiple replicas. Therefore it is suitable for
31-
multiple replicas deployments. Currently only [redis](https://redis.io/) key value store is supported.
32-
Configuration template for distributed cache can be found [here](https://github.com/ContentSquare/chproxy/blob/master/config/#distributed_cache_config)
31+
multiple replicas deployments. Currently only [Redis](https://redis.io/) key value store is supported.
32+
Configuration template for distributed cache can be found [here](https://github.com/ContentSquare/chproxy/blob/master/config/#distributed_cache_config).
3333

3434

docs/content/en/configuration/metrics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ category: Configuration
44
position: 205
55
---
66

7-
Metrics are exposed in [prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/) at `/metrics` path.
7+
Metrics are exposed in [Prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/) at `/metrics` path.
88

99
| Name | Type | Description | Labels |
1010
| ------------- | ------------- | ------------- | ------------- |
@@ -23,7 +23,7 @@ Metrics are exposed in [prometheus text format](https://prometheus.io/docs/instr
2323
| host_health | Gauge | Health state of hosts by clusters | `cluster`, `replica`, `cluster_node` |
2424
| host_penalties_total | Counter | The number of given penalties by host | `cluster`, `replica`, `cluster_node` |
2525
| killed_request_total | Counter | The number of requests killed by proxy | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
26-
| proxied_response_duration_seconds | Summary | Duration for responses proxied from clickhouse | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
26+
| proxied_response_duration_seconds | Summary | Duration for responses proxied from ClickHouse | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
2727
| request_body_bytes_total | Counter | The amount of bytes read from request bodies | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
2828
| request_duration_seconds | Summary | Request duration. Includes possible queue wait time | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
2929
| request_queue_size | Gauge | Request queue size at the moment | `user`, `cluster`, `cluster_user` |
@@ -34,7 +34,7 @@ Metrics are exposed in [prometheus text format](https://prometheus.io/docs/instr
3434
| timeout_request_total | Counter | The number of timed out requests | `user`, `cluster`, `cluster_user`, `replica`, `cluster_node` |
3535
| user_queue_overflow_total | Counter | The number of overflows for per-user request queues | `user`, `cluster`, `cluster_user` |
3636

37-
An example of [Grafana's](https://grafana.com) dashboard for `chproxy` metrics is available [here](https://github.com/ContentSquare/chproxy/blob/master/chproxy_overview.json)
37+
An example of [Grafana's](https://grafana.com) dashboard for `chproxy` metrics is available [here](https://github.com/ContentSquare/chproxy/blob/master/chproxy_overview.json).
3838

3939
![dashboard example](https://user-images.githubusercontent.com/2902918/31392734-b2fd4a18-ade2-11e7-84a9-4aaaac4c10d7.png)
4040

docs/content/en/history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ position: 401
1010
- `max_execution_time` may be exceeded due to the current [implementation deficiencies](https://github.com/yandex/ClickHouse/issues/217).
1111
- `max_concurrent_queries` works only on a per-node basis. There is no way to limit the number of concurrent queries on a cluster if queries are spread across cluster nodes.
1212

13-
Such "leaky" limits may lead to high resource usage on all the cluster nodes. After facing this problem we had to maintain two distinct http proxies in front of our `ClickHouse` cluster - one for spreading `INSERT`s among cluster nodes and another one for sending `SELECT`s to a dedicated node where limits may be enforced somehow. This was fragile and inconvenient to manage, so `chproxy` has been created :)
13+
Such "leaky" limits may lead to high resource usage on all the cluster nodes. After facing this problem we had to maintain two distinct HTTP proxies in front of our `ClickHouse` cluster - one for spreading `INSERT`s among cluster nodes and another one for sending `SELECT`s to a dedicated node where limits may be enforced somehow. This was fragile and inconvenient to manage, so `chproxy` has been created :)
1414

docs/content/en/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
menuTitle: Introduction
33
title: Chproxy
4-
description: Chproxy is an http proxy and load balancer for ClickHouse
4+
description: Chproxy is an HTTP proxy and load balancer for ClickHouse
55
category: Guides
66
position: 101
77
---
88

9-
Chproxy, is an http proxy and load balancer for [ClickHouse](https://ClickHouse.yandex) database. It provides the following features:
9+
Chproxy, is an HTTP proxy and load balancer for [ClickHouse](https://ClickHouse.yandex). It provides the following features:
1010

1111
[![Go Report Card](https://goreportcard.com/badge/github.com/ContentSquare/chproxy)](https://goreportcard.com/report/github.com/ContentSquare/chproxy)
1212
[![Build Status](https://travis-ci.org/ContentSquare/chproxy.svg?branch=master)](https://travis-ci.org/ContentSquare/chproxy?branch=master)
@@ -18,19 +18,19 @@ Chproxy, is an http proxy and load balancer for [ClickHouse](https://ClickHouse.
1818
- May limit HTTP and HTTPS access by IP/IP-mask lists.
1919
- May limit per-user access by IP/IP-mask lists.
2020
- May limit per-user query duration. Timed out or canceled queries are forcibly killed
21-
via [KILL QUERY](http://clickhouse-docs.readthedocs.io/en/latest/query_language/queries.html#kill-query).
21+
via [KILL QUERY](https://clickhouse.tech/docs/en/sql-reference/statements/kill/#kill-query-statement).
2222
- May limit per-user requests rate.
2323
- May limit per-user number of concurrent requests.
2424
- All the limits may be independently set for each input user and for each per-cluster user.
2525
- May delay request execution until it fits per-user limits.
26-
- Per-user [response caching](#caching) may be configured.
26+
- Per-user [response caching](/configuration/caching) may be configured.
2727
- Response caches have built-in protection against [thundering herd](https://en.wikipedia.org/wiki/Cache_stampede) problem aka `dogpile effect`.
2828
- Evenly spreads requests among replicas and nodes using `least loaded` + `round robin` technique.
2929
- Monitors node health and prevents from sending requests to unhealthy nodes.
3030
- Supports automatic HTTPS certificate issuing and renewal via [Let’s Encrypt](https://letsencrypt.org/).
3131
- May proxy requests to each configured cluster via either HTTP or [HTTPS](https://github.com/yandex/ClickHouse/blob/96d1ab89da451911eb54eccf1017eb5f94068a34/dbms/src/Server/config.xml#L15).
3232
- Prepends User-Agent request header with remote/local address and in/out usernames before proxying it to `ClickHouse`, so this info may be queried from [system.query_log.http_user_agent](https://github.com/yandex/ClickHouse/issues/847).
33-
- Exposes various useful [metrics](#metrics) in [prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/).
33+
- Exposes various useful [metrics](/configuration/metrics) in [Prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/).
3434
- Configuration may be updated without restart - just send `SIGHUP` signal to `chproxy` process.
3535
- Easy to manage and run - just pass config file path to a single `chproxy` binary.
3636
- Easy to [configure](https://github.com/contentsquare/chproxy/blob/master/config/examples/simple.yml):

docs/content/en/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ position: 102
77
### Precompiled binaries
88

99
Precompiled `chproxy` binaries are available [here](https://github.com/ContentSquare/chproxy/releases).
10-
Just download the latest stable binary, unpack and run it with the desired [config](#configuration):
10+
Just download the latest stable binary, unpack and run it with the desired [config](/configuration/default):
1111

1212
```
1313
./chproxy -config=/path/to/config.yml

docs/content/en/use-cases/authorize-users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ position: 303
66
---
77

88
Suppose you need to access `ClickHouse` cluster from anywhere by username/password.
9-
This may be used for building graphs from [ClickHouse-grafana](https://github.com/ContentSquare/ClickHouse-grafana) or [tabix](https://tabix.io/).
9+
This may be used for building graphs from [ClickHouse-grafana](https://github.com/ContentSquare/ClickHouse-grafana) or [Tabix](https://tabix.io/).
1010
It is bad idea to transfer unencrypted password and data over untrusted networks.
1111
So HTTPS must be used for accessing the cluster in such cases.
1212
The following `chproxy` config may be used for [this use case](https://github.com/ContentSquare/chproxy/blob/master/config/examples/https.yml):

docs/content/en/use-cases/spread-insert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Spread `INSERT`s among cluster shards
2+
title: Spread INSERTs among cluster shards
33
menuTitle: Spreading INSERTs
44
category: Use Cases
55
position: 301

0 commit comments

Comments
 (0)