适用于go-fastdfs分布式文件系统auth_token验证
v1.0.4
版本
2023-08-09
版本更新时间
15
安装
0
star
Webman plugin ledc/go-fastdfs
安装
composer require ledc/go-fastdfs
简介
基于webman编写的用户自定义验证接口,适用于go-fastdfs分布式文件系统auth_token
验证。
配置
-
项目目录下:
/config/plugin/ledc/go-fastdfs/app.php
-
Nginx配置
location /upload/auth {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://127.0.0.1:8787;
}
go-fastdfs分布式文件系统
基于http协议的分布式文件系统,它基于大道至简的设计理念,一切从简设计,使得它的运维及扩展变得更加简单,它具有高性能、高可靠、无中心、免维护等优点。
接口测试
环境:腾讯云2核心4GB内存
压测指令:ab -n10000 -c200 http://127.0.0.1:8686/upload/auth?auth_token=123456
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: workerman
Server Hostname: 127.0.0.1
Server Port: 8686
Document Path: /upload/auth?auth_token=123456
Document Length: 4 bytes
Concurrency Level: 200
Time taken for tests: 2.938 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 1240000 bytes
HTML transferred: 40000 bytes
Requests per second: 3404.07 [#/sec] (mean)
Time per request: 58.753 [ms] (mean)
Time per request: 0.294 [ms] (mean, across all concurrent requests)
Transfer rate: 412.21 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 0.9 1 7
Processing: 3 57 14.7 54 191
Waiting: 3 56 14.7 53 191
Total: 6 58 14.5 55 192
Percentage of the requests served within a certain time (ms)
50% 55
66% 58
75% 60
80% 62
90% 70
95% 91
98% 104
99% 112
100% 192 (longest request)