Skip to content

Commit 03c5f59

Browse files
authored
Docs: Update all docs (#18)
1 parent c56cb9b commit 03c5f59

File tree

95 files changed

+5945
-5754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+5945
-5754
lines changed

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ English | [中文](README.zh_CN.md)
1818
* [http upload/download service](./en/http_protocol_upload_download_service.md)
1919
* [grpc service](./en/grpc_protocol_service.md)
2020
* [grpc stream service](./en/grpc_protocol_streaming_service.md)
21-
* [flatbuffers service](docs/en/xxx.md)
21+
* [flatbuffers service](docs/en/flatbuffers_protocol_service.md)
2222
* Client
2323
* [guidelines](./en/client_guide.md)
2424
* [access trpc service](./en/client_guide.md)
@@ -27,11 +27,11 @@ English | [中文](README.zh_CN.md)
2727
* [access http upload/download service](./en/http_protocol_upload_download_client.md)
2828
* [access grpc service](./en/grpc_protocol_client.md)
2929
* [access grpc stream service](./en/grpc_protocol_streaming_service.md)
30-
* [access flatbuffers service](docs/en/xxx.md)
30+
* [access flatbuffers service](docs/en/flatbuffers_protocol_client.md)
3131
* [access redis service](./en/redis_client_guide.md)
3232
* Fiber
3333
* [deep in fiber](./en/fiber.md)
34-
* [fiber user guide](./en/fiber_user_guide.md)
34+
* [fiber user guide](./en/fiber_user_guide.md)
3535
* [fiber faq](./en/fiber_faq.md)
3636
* [Future/Promise](./en/future_promise_guide.md)
3737
* [Plugin](./en/plugin_management.md)

docs/README.zh_CN.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,19 @@
1818
* [开发http上传/下载服务](./zh/http_protocol_upload_download_service.md)
1919
* [开发grpc协议服务](./zh/grpc_protocol_service.md)
2020
* [开发grpc流式服务](./zh/grpc_protocol_streaming_service.md)
21-
* [开发flatbuffers协议服务](docs/en/xxx.md)
21+
* [开发flatbuffers协议服务](docs/zh/flatbuffers_protocol_service.md)
2222
* 客户端开发
2323
* [开发向导](./zh/client_guide.md)
2424
* [访问trpc协议服务](./zh/client_guide.md)
2525
* [访问trpc流式协议服务](./zh/trpc_protocol_streaming_client.md)
2626
* [访问http(s)协议服务](./zh/http_protocol_client.md)
2727
* [访问http上传/下载服务](./zh/http_protocol_upload_download_client.md)
2828
* [访问grpc协议服务](./zh/grpc_protocol_client.md)
29-
* [访问grpc流式协议服务](./zh/grpc_protocol_streaming_service.md)
30-
* [访问flatbuffers协议服务](./zh/flatbuffers_protocol_service.md)
29+
* [访问flatbuffers协议服务](./zh/flatbuffers_protocol_client.md)
3130
* [访问redis协议服务](./zh/redis_client_guide.md)
3231
* Fiber
3332
* [深入理解Fiber](./zh/fiber.md)
34-
* [Fiber用户开发指南](./zh/fiber_user_guide.md)
33+
* [Fiber用户开发指南](./zh/fiber_user_guide.md)
3534
* [Fiber常见问题](./zh/fiber_faq.md)
3635
* [Future/Promise](./zh/future_promise_guide.md)
3736
* [插件](./zh/plugin_management.md)
@@ -40,7 +39,7 @@
4039
* 拦截器
4140
* [开发自定义拦截器](./zh/filter.md)
4241
* 流控和过载保护
43-
* []()
42+
* [基于并发请求的过载保护](./zh/overload_control_concurrency_limiter.md)
4443
* Naming插件
4544
* [开发自定义naming插件](./zh/custom_naming.md)
4645
* [mesh-polaris](https://github.com/trpc-ecosystem/cpp-naming-polarismesh/blob/main/README.zh_CN.md)
@@ -71,4 +70,4 @@
7170
* [tvar](./zh/tvar.md)
7271
* [admin](./zh/admin_service.md)
7372
* [runtime info]()
74-
* Faqs
73+
* Faqs

docs/en/admin_service.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Usage:
189189
3. Invoke the command
190190

191191
```shell
192-
$ curl http://admin_ip:admin_port/cmds/reload-config -X POST
192+
curl http://admin_ip:admin_port/cmds/reload-config -X POST
193193
{"errorcode":0,"message":"reload config ok"}
194194
```
195195

@@ -213,7 +213,7 @@ server:
213213
Example:
214214

215215
```shell
216-
$ curl http://dmin_ip:admin_port/cmds/stats
216+
curl http://dmin_ip:admin_port/cmds/stats
217217
{"errorcode":0,"message":"","stats":{"conn_count":1,"total_req_count":11,"req_concurrency":1,"now_req_count":3,"last_req_count":4,"total_failed_req_count":0,"now_failed_req_count":0,"last_failed_req_count":0,"total_avg_delay":0.18181818181818183,"now_avg_delay":0.3333333333333333,"last_avg_delay":0.25,"max_delay":1,"last_max_delay":1}}
218218
```
219219

@@ -246,7 +246,7 @@ Interface description: You can directly access "/cmds/var" to view all tvar vari
246246
Example:
247247

248248
```shell
249-
$ curl http://127.0.0.1:8889/cmds/var
249+
curl http://127.0.0.1:8889/cmds/var
250250
{
251251
"trpc" :
252252
{
@@ -406,14 +406,14 @@ Usage:
406406
1. Start sampling
407407

408408
```shell
409-
$ curl http://admin_ip:admin_port/cmds/profile/heap?enable=y -X POST
409+
curl http://admin_ip:admin_port/cmds/profile/heap?enable=y -X POST
410410
{"errorcode":0,"message":"OK"}
411411
```
412412

413413
2. Stop sampling
414414

415415
```shell
416-
$ curl http://admin_ip:admin_port/cmds/profile/heap?enable=n -X POST
416+
curl http://admin_ip:admin_port/cmds/profile/heap?enable=n -X POST
417417
{"errorcode":0,"message":"OK"}
418418
```
419419

@@ -462,7 +462,7 @@ $ curl http://admin_ip:admin_port/client_detach -X POST -d 'service_name=trpc.ap
462462
{"message":"service is not exist"}
463463
```
464464

465-
# Customize management commands
465+
# Custom management commands
466466

467467
The tRPC-Cpp allows users to customize and register management commands to perform additional management operations as needed by the user. For specific usage examples, please refer to the [admin example](../../examples/features/admin/proxy/).
468468

@@ -551,6 +551,6 @@ Usage:
551551
After the service is started, you can trigger the custom management command by accessing `http://admin_ip:admin_port/myhandler`.
552552

553553
```shell
554-
$ curl http://admin_ip:admin_port/myhandler
554+
curl http://admin_ip:admin_port/myhandler
555555
{"errorcode":0,"message":"success"}
556556
```

docs/en/architecture_design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The service exit process generally includes the following processes:
118118

119119
## Pluggable design
120120

121-
The pluggable architecture design of tRPC is based on "**plugin factory based on interface mechanism**" and "**filter based on AOP**".
121+
The pluggable architecture design of tRPC is based on **plugin factory based on interface mechanism** and **filter based on AOP**.
122122

123123
### Plugin factory
124124

docs/en/attachment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ServerContext {
4040
4141
/// @brief Set response attachment data
4242
void SetResponseAttachment(NoncontiguousBuffer&& attachment);
43-
...
43+
44+
// ...
4445
}
4546
```

docs/en/backup_request.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Overview
44

55
Sometimes, to ensure availability or reduce tail latency, it is necessary to simultaneously access two services and take the response from whichever arrives first. There are generally two approaches to implementing this functionality:
6+
67
1. Concurrently send two requests and take the result from the one that returns first.
7-
2. Set a reasonable resend time. If a request times out or fails
8+
2. Set a reasonable resend time. If a request times out or fails
89
within the resend time, send the second request and take the result from the one that returns first.
910

1011
One issue with approach 1 is that it doubles the backend traffic. Approach 2, on the other hand, typically results in only one request under normal circumstances, keeping the backend traffic mostly unchanged. Considering this, we chooses to implement approach 2.
@@ -91,10 +92,12 @@ If the strategy of the 'retry_hedging_limit' retry rate limiting filter does not
9192
## View the triggering results of backup requests
9293

9394
The framework provides two tvar variables related to backup requests internally (where service_name is the name of the called service):
94-
"trpc/client/service_name/backup_request" —— indicate how many times the backup request has been triggered
95-
"trpc/client/service_name/backup_request_success" —— represent the number of times the backup request has resulted in a successful invocation
95+
96+
- trpc/client/service_name/backup_request: indicate how many times the backup request has been triggered
97+
- trpc/client/service_name/backup_request_success: represent the number of times the backup request has resulted in a successful invocation
9698

9799
These two variables can be viewed using management commands:
100+
98101
```shell
99102
curl http://admin_ip:admin_port/cmds/var/xxx # xxx represent tvar variables
100103
```
@@ -105,6 +108,6 @@ It also supports reporting attribute monitoring to the corresponding platform.
105108

106109
1. Interface idempotence: Users need to ensure that the RPC calls they use are idempotent across different nodes.
107110
2. Before enabling backup requests, it is important to ensure that the backend service has sufficient processing capacity to avoid triggering a service avalanche when backup requests are made.
108-
3. It is necessary to select an appropriate resend time to reduce call latency while avoiding excessive traffic impact on the backend service. Usually, metrics such as P90/P95/P99 can be used as a basis for selection.
111+
3. It is necessary to select an appropriate resend time to reduce call latency while avoiding excessive traffic impact on the backend service. Usually, metrics such as P90/P95/P99 latency can be used as a basis for selection.
109112
4. Backup requests are not suitable for UDP, one-way calls, or streaming calls.
110-
5. If there is only one available node in the backend service or the set resend time is greater than the request timeout, the backup request will degrade into a normal one-to-one call.
113+
5. If there is only one available node in the backend service or the set resend time is greater than the request timeout, the backup request will degrade into a normal one-to-one call.

0 commit comments

Comments
 (0)