EasySwoole words-match组件 发布

words-match组件是基于字典树(DFA)并利用UnixSock通讯和自定义进程实现,开发本组件的目的是帮小伙伴们快速部署关键词检测服务,这对于内容型产品来说非常重要。

使用场景
所有跟文本内容相关的产品都可以,比如:
博客:评论、文章
即时通讯: 聊天室中的消息

服务端支持可配置化多进程

客户端支持实时检测、添加、移除敏感词,支持词库的在线切换和字典树中的敏感词落地成文件。

GitHub

words-match 仓库地址 https://github.com/easy-swool...
easyswoole 仓库地址 https://github.com/easy-swool...
项目官网 http://www.easyswoole.com/

交流群

EasySwoole官方一群 633921431(已满)
EasySwoole官方二群 709134628

压测

简单测试数据(仅做参考,具体还以线上验证)

服务开启3个进程。

电脑配置
MacBook Air (13-inch, 2017)
处理器 1.8 GHz Intel Core i5
内存 8 GB 1600 MHz DDR3

1.5万词

并发10总请求数100

Concurrency Level: 10
Time taken for tests: 0.067 seconds
Complete requests: 100
Failed requests: 0
Non-2xx responses: 100
Total transferred: 17300 bytes
HTML transferred: 2600 bytes
Requests per second: 1492.49 [#/sec] (mean)
Time per request: 6.700 [ms] (mean)
Time per request: 0.670 [ms] (mean, across all concurrent requests)
Transfer rate: 252.15 [Kbytes/sec] received

并发100总请求数1000

Concurrency Level: 100
Time taken for tests: 0.239 seconds
Complete requests: 1000
Failed requests: 0
Non-2xx responses: 1000
Total transferred: 173000 bytes
HTML transferred: 26000 bytes
Requests per second: 4189.17 [#/sec] (mean)
Time per request: 23.871 [ms] (mean)
Time per request: 0.239 [ms] (mean, across all concurrent requests)
Transfer rate: 707.74 [Kbytes/sec] received

13万词

并发10总请求数100

Concurrency Level: 10
Time taken for tests: 0.057 seconds
Complete requests: 100
Failed requests: 0
Non-2xx responses: 100
Total transferred: 17300 bytes
HTML transferred: 2600 bytes
Requests per second: 1751.71 [#/sec] (mean)
Time per request: 5.709 [ms] (mean)
Time per request: 0.571 [ms] (mean, across all concurrent requests)
Transfer rate: 295.94 [Kbytes/sec] received

并发100总请求数1000

Concurrency Level: 100
Time taken for tests: 0.225 seconds
Complete requests: 1000
Failed requests: 0
Non-2xx responses: 1000
Total transferred: 173000 bytes
HTML transferred: 26000 bytes
Requests per second: 4444.84 [#/sec] (mean)
Time per request: 22.498 [ms] (mean)
Time per request: 0.225 [ms] (mean, across all concurrent requests)
Transfer rate: 750.93 [Kbytes/sec] received

你可能感兴趣的:(php,easyswoole,swoole)