Skip to content

⚡️ Realtime scalable server performance monitor application built using react, node, redis and socket.io with clusters module.

License

Notifications You must be signed in to change notification settings

dulajkavinda/performance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PERFMonitor - Performance Monitoring System

Introduction

PERFMonitor is a web application that shows you performance and problems of one or more server instances in near realtime. socket.io is used for realtime data streaming and dashboard is built using react. PERFMonitor uses redis adapter to handle connection in socket.io and it also uses mongodb to store data.

animated

Stack

  • NodeJS - backend server
  • ReactJS - frontend ui framework
  • Socket.io - for realtime data transferring
  • Redis - in memory database
  • MongoDB - database

Architecture

several node clients can be installed in multiple servers and they can communicate with out socket.io server. these node clients essentially send their servers performance data as an object. to make this project scalable in the socket server I used node cluster module to distribute requests coming from individual node client. and I've used redis adapter as an a in memory database to handle any issues when using cluster module and socket together. finally socket server will send data in 1 second intervals to react frontend making this a near realtime performance monitoring system.

animated

Setting Up

Prerequisite

  • node
  • npm or yarn

setting up redis

install redis and run redis before running the socket.io node server

wget https://download.redis.io/releases/redis-6.2.5.tar.gz
tar xzf redis-6.2.5.tar.gz
cd redis-6.2.5
make

cd ./src/redis-server

setting up node client

git clone https://github.com/dulajkavinda/performance.git
cd node-client

yarn install
yarn start
  • you can access the node client from port localhost:8181

setting up socket.io node server

git clone https://github.com/dulajkavinda/performance.git
cd server

yarn install
yarn start
  • set your MongoDB url in here,
mongoose.connect("mongodb://127.0.0.1/perfData", { useNewUrlParser: true });

setting up react client

https://github.com/dulajkavinda/performance.git
cd client

yarn install
yarn start
  • go to localhost:3000

How to Contribute

Got ideas on how to make this better? Open an issue here! Issues, Pull Requests and all Comments are welcome!

License

MIT © dulajkavinda

About

⚡️ Realtime scalable server performance monitor application built using react, node, redis and socket.io with clusters module.

Topics

Resources

License

Stars

Watchers

Forks