首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nodeMQ 基于nodejs跟Redis的开源消息队列系统

2014-01-06 
nodeMQ 基于nodejs和Redis的开源消息队列系统nodeMQ 是基于Nodejs 和Redis 开发的消息队列系统,目前仅仅是

nodeMQ 基于nodejs和Redis的开源消息队列系统

nodeMQ 是基于Nodejs 和Redis 开发的消息队列系统,目前仅仅是beta版本。

支持简单的put get操作,采用http协议访问。项目地址:https://github.com/lnmp/nodemq

Redis client 采用的是 https://github.com/tristandunn/node-redis-client

基于Redis 数据库,可以方便进行性能调优,和支持分布式的消息队列,nodejs 自身又可作为webserver,二次开发也非常方便,全部代码才100多行,这仅仅是第一个beta版本,后面考虑添加监控运行状态的功能和提升性能

==============================================
使用说明
put 操作

curl "http://10.0.0.106:8000/put?data=xxxxxxxxxx"

get 操作

curl "http://10.0.0.106:8000/get"

===========================================
安装&使用
安装nodejs和Redis之后,

git clone https://github.com/lnmp/nodemq.gitcd nodemq

config.js 负责配置nodemq server 和redis的端口和域名

运行nodemq 也非常简单

node index.js

==============================================
压力测试数据 原生配置文件,对Redis没有进行任何优化

put操作压力测试

[libo@search106 src]$ webbench -t 10 -c 100 http://10.0.0.106:8000/put?data=xxxxxxxxxxWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/put?data=xxxxxxxxxx100 clients, running 10 sec.?Speed=242718 pages/min, 307442 bytes/sec.Requests: 40453 susceed, 0 failed.??[libo@search106 src]$ webbench -t 10 -c 300 http://10.0.0.106:8000/put?data=xxxxxxxxxxWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/put?data=xxxxxxxxxx300 clients, running 10 sec.?Speed=247836 pages/min, 315873 bytes/sec.Requests: 41306 susceed, 0 failed.??[libo@search106 src]$ webbench -t 10 -c 500 http://10.0.0.106:8000/put?data=xxxxxxxxxxWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/put?data=xxxxxxxxxx500 clients, running 10 sec.?Speed=237558 pages/min, 304866 bytes/sec.Requests: 39593 susceed, 0 failed.

get 操作压力测试

[libo@search106 src]$ webbench -t 10 -c 100 http://10.0.0.106:8000/getWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/get100 clients, running 10 sec.?Speed=287718 pages/min, 359655 bytes/sec.Requests: 47953 susceed, 0 failed.???[libo@search106 src]$ webbench -t 10 -c 300 http://10.0.0.106:8000/getWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/get300 clients, running 10 sec.?Speed=298908 pages/min, 373635 bytes/sec.Requests: 49818 susceed, 0 failed.??[libo@search106 src]$ webbench -t 10 -c 500 http://10.0.0.106:8000/getWebbench - Simple Web Benchmark 1.5Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.?Benchmarking: GET http://10.0.0.106:8000/get500 clients, running 10 sec.?Speed=294066 pages/min, 367582 bytes/sec.Requests: 49011 susceed, 0 failed.

?

热点排行