report-monitor icon indicating copy to clipboard operation
report-monitor copied to clipboard

【Report Monitor】一款完整、高性能、高可用的打点监控和统计平台

【Report Monitor】一款完整、高性能、高可用的打点监控和统计平台

Node Nest Mongodb Redis React

技术栈

后端:Nest.js+TypeScript+MongoDB+Redis 传送门

前端:React.js+Ant Design+TypeScript 传送门

项目说明

  • 项目已部署到正式环境,并已稳定运行一段时间,请放心使用。
  • 前期推荐使用单机数据库或者Mongodb副本集架构,后期根据自身需求考虑是否使用集群分片
  • 目前4核8G单机服务器大概能支撑每日50-100W的pv,8核16G单机服务器可支撑100W-500W的PV流量
  • 项目后台查询性能增加合适的索引之后,千万以上的数据量可在100ms-2s之内查询出来,平均100-300ms(单机/副本集)

体验地址:Report Monitor

项目设计思路

打点上报使用说明

浏览器

一行代码上报:


const href = '网站域名'+'/rapi/report/create?code=xxxx'

new Image().src = href

or

navigator.sendBeacon(href)

Java


String href = '网站域名'+'/rapi/report/create?code=xxxx'
CloseableHttpClient httpclient = HttpClients.createDefault();
httpclient.execute(new HttpGet(href));

python

import  requests
href = '网站域名'+'/rapi/report/create?code=xxxx'
requests.get(href)

其他语言类似,只许发送一条简单的get请求。

项目部署和启动

安装mongoDB和Redis

MongoDB:

Windows 平台安装 MongoDB

Linux 平台安装 MongoDB

Redis:

Redis 安装

启动(nestjs)

开发:


npm run start:dev

生产:


npm run build

展示效果

交流和建议

相关建议+共同开发联系:[email protected]

License

MIT