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

Overview

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

You might also like...
Chat Loop is a highly scalable, low-cost, and high performant chat application built on AWS and React leveraging GraphQL subscriptions for real-time communication.
Chat Loop is a highly scalable, low-cost, and high performant chat application built on AWS and React leveraging GraphQL subscriptions for real-time communication.

Chat Loop is a highly scalable, low-cost, and high performant chat application built on AWS and React leveraging GraphQL subscriptions for real-time communication.

Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)Online Marketplace Built with MERN stack (MongoDB, Express, React and Node)

🛒 Shopping App 🛒 Online Marketplace Built with MERN stack (MongoDB, Express, React and Node). ⚡️ ⚡️ ⚡️ Kiwi Shop ⚡️ ⚡️ ⚡️ 📜 Table of contents Main

A React Contact Application Using Realtime Database
A React Contact Application Using Realtime Database

Project Title Contact Application Using Realtime Database An application created

A real-time chat application made using ReactJs, ExpressJs, NodeJs, and Socket.io.
A real-time chat application made using ReactJs, ExpressJs, NodeJs, and Socket.io.

insta-chat Live Site ScreenShots Instachat is a real-time chat app made with ReactJs on the front-end and ExpressJs , NodeJS , Socket.io web socket li

Example of chat web application using Socket.IO with the MERN stack Client in React

Real time chat app Example of chat web application using Socket.IO with the MERN

A React Realtime Chat Application with Social Auth and dedicated chat APIs/sockets.
A React Realtime Chat Application with Social Auth and dedicated chat APIs/sockets.

Chat-Room This is a fully responsive React chat application with social authentication including Google and Facebook using Firebase online statuses, g

A Realtime Chat Application based on React Native and Expo with backend as AWS Amplify
A Realtime Chat Application based on React Native and Expo with backend as AWS Amplify

WhatAppClone based on React Native for iOS [WhatAppClone] is a basic chat application made with React-Native. NOTE:- BACKEND SUPPORT COMING SOON..(via

A full Realtime Chat Application with Social Auth and dedicated chat APIs/sockets.
A full Realtime Chat Application with Social Auth and dedicated chat APIs/sockets.

Iced-Chat A full Realtime Chat Application with Social Auth and dedicated chat APIs/sockets. It uses Firebase(from google) for auth. It also uses Chat

Video chat app built using React, Socket.io and WebRTC

Video Chat Web App It has been built using React, Material UI, Socket.io and WebRTC To open this on your browser click here Backend has been deployed

Comments
  • [nodemon] app crashed - waiting for file changes before starting..

    [nodemon] app crashed - waiting for file changes before starting..

    At this step: setting up socket.io node server

    1. ningji@ningji-ThinkCentre-M920q:~/2keep/performance/server$ ag "mongoose.connect" socket_main.js mongoose.connect("mongodb://127.0.0.1/perfData", { useNewUrlParser: true });

    2. when i do "npm start", it keeps on giving this error:

    MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017 at NativeConnection.Connection.openUri (/home/ningji/2keep/performance/server/node_modules/mongoose/lib/connection.js:796:32) at /home/ningji/2keep/performance/server/node_modules/mongoose/lib/index.js:328:10 at /home/ningji/2keep/performance/server/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5 at new Promise () at promiseOrCallback (/home/ningji/2keep/performance/server/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10) at Mongoose._promiseOrCallback (/home/ningji/2keep/performance/server/node_modules/mongoose/lib/index.js:1149:10) at Mongoose.connect (/home/ningji/2keep/performance/server/node_modules/mongoose/lib/index.js:327:20) at Object. (/home/ningji/2keep/performance/server/socket_main.js:2:10) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) { reason: TopologyDescription { type: 'Unknown', servers: Map(1) { '127.0.0.1:27017' => ServerDescription { _hostAddress: HostAddress { isIPv6: false, host: '127.0.0.1', port: 27017 }, address: '127.0.0.1:27017', type: 'Unknown', hosts: [], passives: [], arbiters: [], tags: {}, minWireVersion: 0, maxWireVersion: 0, roundTripTime: -1, lastUpdateTime: 114953270, lastWriteDate: 0, error: MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 at connectionFailureError (/home/ningji/2keep/performance/server/node_modules/mongodb/lib/cmap/connect.js:293:20) at Socket. (/home/ningji/2keep/performance/server/node_modules/mongodb/lib/cmap/connect.js:267:22) at Object.onceWrapper (node:events:642:26) at Socket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) } }, stale: false, compatible: true, heartbeatFrequencyMS: 10000, localThresholdMS: 15, logicalSessionTimeoutMinutes: undefined } } [nodemon] app crashed - waiting for file changes before starting...

    opened by ningji 1
Owner
Dulaj Kavinda
I'm ok at coding.
Dulaj Kavinda
Discord-clone - Discord Clone using React, ReactQuery, Tailwindcss, Redux, Socket IO, NodeJS, Express, MongoDB and Redis

Discord Clone using React, ReactQuery, Tailwindcss, Redux, Socket IO, NodeJS, Ex

Milad Ranjbar 205 Dec 18, 2022
Realtime Chat App with React, Node.js, Socket.io and MongoDB

reactchatapp Realtime Chat App Features/Components Uses React Js for UI Backend using NodeJs Authentication using JWT MongoDB for database Socket.io f

Aayush Jha 15 Dec 22, 2022
React-realtime-example - Example Demonstrating React with Realtime API Backend

Getting Started with React Realtime Example App This project contains two folder

Haitham Sweilem 1 Jan 6, 2022
A simple and convenient way to monitor the activity and performance of your servers. Probably more ergonomic than your average terminal htop.

A simple and convenient way to monitor the activity and performance of your servers. Probably more ergonomic than your average terminal htop.

Philippe Négrel-Jerzy 257 Dec 31, 2022
Chat Application Using React, Node.js and Socket.io with MongoDB

Steps to Start the App Install the Public Dependencies Install the Server Dependencies In the Server Directory there's a .env file. Change the value o

Kishan Sheth 244 Dec 31, 2022
React-node-notion - An example of a React app and Node server using Notion as a CMS

Running the Project Create an env file with your Notion credentials Create a ser

Alex 18 Nov 4, 2022
💘 Dating app - Built with Node, React, Postgres, Socket.io & Material-UI

Built with Node, React, Postgres, Socket.io & Material-UI The project Matcha is a dating app with the following features: ?? non-binary

Full-Stack King 10 Nov 25, 2022
Discord Clone using React, Node, Express, Socket-IO and Mysql

React Discord Clone Functional Discord Clone written in Typescript using React, Socket IO, NodeJS, Express and MySQL View the live verison at -> http:

Eric Ellbogen 401 Dec 27, 2022
CoderHouse - A Clubhouse project using Node, Express, Mongo, webRTC, socket.io, and React JS

codershouse-mern - This Project is Under Development. Below are some of the impl

Bishal Das 35 Nov 18, 2022
Real-time chat app using Firebase, React, TailwindCSS, MongoDB, Node/Express, and Socket.io

Let's Chat A real-time chat application. Another fun side project :) GIFs are attached at the end. Technologies Used React and TailwindCSS for the fro

Hana Belay 31 Jan 4, 2023