{"id":37788056,"url":"https://github.com/intfish123/volo-boot","last_synced_at":"2026-01-16T15:14:11.493Z","repository":{"id":286786769,"uuid":"954616294","full_name":"intfish123/volo-boot","owner":"intfish123","description":"volo-http 和 volo-rpc整合示例","archived":false,"fork":false,"pushed_at":"2025-08-25T09:38:56.000Z","size":799,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T09:57:17.311Z","etag":null,"topics":["http","rpc","rust","volo"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intfish123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-25T11:01:57.000Z","updated_at":"2025-08-25T09:38:59.000Z","dependencies_parsed_at":"2025-06-13T12:31:06.408Z","dependency_job_id":"712111d1-d2aa-4181-bfae-76ebd23f9009","html_url":"https://github.com/intfish123/volo-boot","commit_stats":null,"previous_names":["intfish123/volo-boot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/intfish123/volo-boot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intfish123%2Fvolo-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intfish123%2Fvolo-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intfish123%2Fvolo-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intfish123%2Fvolo-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intfish123","download_url":"https://codeload.github.com/intfish123/volo-boot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intfish123%2Fvolo-boot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","rpc","rust","volo"],"created_at":"2026-01-16T15:14:10.861Z","updated_at":"2026-01-16T15:14:11.482Z","avatar_url":"https://github.com/intfish123.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# volo-http 和 volo-rpc整合示例\n## 目录结构\n* /api: 网关模块\n* ~~/common: 放一些公共组件代码, 如日志配置等~~ 已替换为: [pd-rs-common](https://docs.rs/pd-rs-common/latest/pd_rs_common)\n* /rpc: 放rpc服务\n\n## 相关issue\n[issue](https://github.com/cloudwego/volo/issues/550)\n\n## 功能进度\n- [x] 基于volo的http网关代码  \n- [x] 基于volo的grpc服务代码\n- [x] 使用nacos作为服务注册发现中心\n- [x] 从http网关到调用grpc服务的调用代码\n- [x] http网关模块集成prometheus\n- [x] 限流组件(基于nacos配置的简易内存版限流，正则匹配path, 支持配置动态更新)\n- [x] 拦截请求header或参数\n- [x] 性能强悍(能抗住超高QPS)\n\n## 构建镜像\n\u003e 注意！国内用户如果有代理的话，先加上代理，再编译  \n\u003e ```shell\n\u003e export http_proxy=http://127.0.0.1:7890  \n\u003e export https_proxy=http://127.0.0.1:7890  \n\u003e ```\n### api\n在项目根目录下执行下面命令:\n```shell\ndocker buildx build \\\n  --allow network.host \\\n  --platform linux/amd64 \\\n  --progress=auto \\\n  --load \\\n  -f api/Dockerfile \\\n  -t intfish123/volo-boot-api:v0.1.0 .\n```\n### order-rpc\n在项目根目录下执行下面命令:\n```shell\ncd rpc/order\ndocker buildx build \\\n  --allow network.host \\\n  --platform linux/amd64 \\\n  --progress=auto \\\n  --load \\\n  -f Dockerfile \\\n  -t intfish123/volo-boot-order-rpc:v0.1.0  .\n```\n### user-rpc\n在项目根目录下执行下面命令:\n```shell\ncd rpc/user\ndocker buildx build \\\n  --allow network.host \\\n  --platform linux/amd64 \\\n  --progress=auto \\\n  --load \\\n  -f Dockerfile \\\n  -t intfish123/volo-boot-user-rpc:v0.1.0  .\n```\n\n### 压测\n使用 apache bench 工具, 压测命令:  `ab -n 3000000 -c 2000  http://10.30.160.139:8080/user/query-one?id=123`    \nPod资源设置: api服务和rpc都限制为: 2核 512MB  \n   \n**资源使用:** \n\u003cimg src=\"api/benchmark/resource_usage_mark.png\"\u003e\n\n**QPS和耗时:**  \n\u003cimg src=\"api/benchmark/qps.png\"\u003e\n\n**第一台机器输出:**  \n```shell\nServer Software:        \nServer Hostname:        10.30.160.139\nServer Port:            8080\n\nDocument Path:          /user/query-one?id=123\nDocument Length:        126 bytes\n\nConcurrency Level:      2000\nTime taken for tests:   1051.129 seconds\nComplete requests:      3000000\nFailed requests:        0\nWrite errors:           0\nTotal transferred:      996000000 bytes\nHTML transferred:       378000000 bytes\nRequests per second:    2854.07 [#/sec] (mean)\nTime per request:       700.753 [ms] (mean)\nTime per request:       0.350 [ms] (mean, across all concurrent requests)\nTransfer rate:          925.34 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        1    6  67.1      2    3010\nProcessing:    14  694 157.6    698    1538\nWaiting:        6  694 157.6    698    1538\nTotal:         31  700 172.1    700    4149\n\nPercentage of the requests served within a certain time (ms)\n  50%    700\n  66%    752\n  75%    785\n  80%    808\n  90%    886\n  95%    979\n  98%   1078\n  99%   1135\n 100%   4149 (longest request)\n```\n**第二台机器输出:**  \n```shell\nServer Software:        \nServer Hostname:        10.30.160.139\nServer Port:            8080\n\nDocument Path:          /user/query-one?id=123\nDocument Length:        126 bytes\n\nConcurrency Level:      2000\nTime taken for tests:   1064.812 seconds\nComplete requests:      3000000\nFailed requests:        0\nTotal transferred:      996000000 bytes\nHTML transferred:       378000000 bytes\nRequests per second:    2817.40 [#/sec] (mean)\nTime per request:       709.875 [ms] (mean)\nTime per request:       0.355 [ms] (mean, across all concurrent requests)\nTransfer rate:          913.45 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        3    8  67.5      4    1071\nProcessing:    22  701 151.4    702    1559\nWaiting:       22  701 151.4    702    1559\nTotal:         25  709 166.8    706    2310\n\nPercentage of the requests served within a certain time (ms)\n  50%    706\n  66%    758\n  75%    791\n  80%    813\n  90%    891\n  95%    985\n  98%   1084\n  99%   1143\n 100%   2310 (longest request)\n```\n**第三台机器输出:**  \n```shell\nServer Software:        \nServer Hostname:        10.30.160.139\nServer Port:            8080\n\nDocument Path:          /user/query-one?id=123\nDocument Length:        126 bytes\n\nConcurrency Level:      2000\nTime taken for tests:   1064.534 seconds\nComplete requests:      3000000\nFailed requests:        0\nTotal transferred:      996000000 bytes\nHTML transferred:       378000000 bytes\nRequests per second:    2818.14 [#/sec] (mean)\nTime per request:       709.689 [ms] (mean)\nTime per request:       0.355 [ms] (mean, across all concurrent requests)\nTransfer rate:          913.69 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        3    8  67.0      4    1071\nProcessing:    26  701 151.9    702    1590\nWaiting:       26  701 151.9    702    1590\nTotal:         30  709 167.1    706    2326\n\nPercentage of the requests served within a certain time (ms)\n  50%    706\n  66%    758\n  75%    791\n  80%    814\n  90%    891\n  95%    985\n  98%   1084\n  99%   1142\n 100%   2326 (longest request)\n```\n**第4台机器输出:**  \n```shell\nServer Software:        \nServer Hostname:        10.30.160.139\nServer Port:            8080\n\nDocument Path:          /user/query-one?id=123\nDocument Length:        126 bytes\n\nConcurrency Level:      2000\nTime taken for tests:   471.436 seconds\nComplete requests:      3000000\nFailed requests:        0\nTotal transferred:      996000000 bytes\nHTML transferred:       378000000 bytes\nRequests per second:    6363.54 [#/sec] (mean)\nTime per request:       314.291 [ms] (mean)\nTime per request:       0.157 [ms] (mean, across all concurrent requests)\nTransfer rate:          2063.18 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        3    6  39.6      4    1070\nProcessing:    19  308 257.4    214    1568\nWaiting:       19  308 257.4    214    1568\nTotal:         22  314 263.6    218    2275\n\nPercentage of the requests served within a certain time (ms)\n  50%    218\n  66%    249\n  75%    276\n  80%    303\n  90%    823\n  95%    968\n  98%   1069\n  99%   1117\n 100%   2275 (longest request)\n```\n## 说明\n目前这个示例项目架构还没在生产环境验证，只是自己学习和测试用\n\n交流学习群:  \n\u003cimg src=\"feishu_chat.png\" width=\"377\" height=\"409\" align=\"bottom\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintfish123%2Fvolo-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintfish123%2Fvolo-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintfish123%2Fvolo-boot/lists"}