{"id":15675095,"url":"https://github.com/dulajkavinda/performance","last_synced_at":"2025-05-06T23:42:28.559Z","repository":{"id":106045629,"uuid":"408127011","full_name":"dulajkavinda/performance","owner":"dulajkavinda","description":"⚡️ Realtime scalable server performance monitor application built using react, node, redis and socket.io with clusters module. ","archived":false,"fork":false,"pushed_at":"2021-09-25T19:18:16.000Z","size":5697,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T10:52:35.427Z","etag":null,"topics":["added","express","latest","mongodb","nodejs","performance-monitoring","react","redis","socket-io","socketio"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dulajkavinda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-19T12:54:55.000Z","updated_at":"2023-09-20T05:17:48.000Z","dependencies_parsed_at":"2023-03-10T11:15:19.687Z","dependency_job_id":null,"html_url":"https://github.com/dulajkavinda/performance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dulajkavinda%2Fperformance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dulajkavinda%2Fperformance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dulajkavinda%2Fperformance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dulajkavinda%2Fperformance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dulajkavinda","download_url":"https://codeload.github.com/dulajkavinda/performance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252788387,"owners_count":21804280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["added","express","latest","mongodb","nodejs","performance-monitoring","react","redis","socket-io","socketio"],"created_at":"2024-10-03T15:56:20.355Z","updated_at":"2025-05-06T23:42:28.505Z","avatar_url":"https://github.com/dulajkavinda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PERFMonitor - Performance Monitoring System\n\n### Introduction\n\nPERFMonitor is a web application that shows you performance and problems of one or more server instances in near realtime. [socket.io](http://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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100%\" src=\"docs/demo.gif\" alt=\"animated\" /\u003e\n\u003c/p\u003e\n\n### Stack\n\n- NodeJS - backend server\n- ReactJS - frontend ui framework\n- [Socket.io](http://socket.io) - for realtime data transferring\n- Redis - in memory database\n- MongoDB - database\n\n### Architecture\n\nseveral node clients can be installed in multiple servers and they can communicate with out [socket.io](http://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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100%\" src=\"docs/diagram.png\" alt=\"animated\" /\u003e\n\u003c/p\u003e\n\n## Setting Up\n\n### Prerequisite\n\n- node\n- npm or yarn\n\n### setting up redis\n\ninstall redis and run redis before running the [socket.io](http://socket.io) node server\n\n```jsx\nwget https://download.redis.io/releases/redis-6.2.5.tar.gz\ntar xzf redis-6.2.5.tar.gz\ncd redis-6.2.5\nmake\n\ncd ./src/redis-server\n```\n\n### setting up node client\n\n```jsx\n\ngit clone https://github.com/dulajkavinda/performance.git\ncd node-client\n\nyarn install\nyarn start\n```\n\n- you can access the node client from port localhost:8181\n\n### setting up [socket.io](http://socket.io) node server\n\n```jsx\ngit clone https://github.com/dulajkavinda/performance.git\ncd server\n\nyarn install\nyarn start\n```\n\n- set your MongoDB url in here,\n\n```jsx\nmongoose.connect(\"mongodb://127.0.0.1/perfData\", { useNewUrlParser: true });\n```\n\n### setting up react client\n\n```jsx\nhttps://github.com/dulajkavinda/performance.git\ncd client\n\nyarn install\nyarn start\n```\n\n- go to localhost:3000\n\n### How to Contribute\n\nGot ideas on how to make this better? Open an issue [here!](https://github.com/dulajkavinda/performance/issues)\nIssues, Pull Requests and all Comments are welcome!\n\n### License\n\nMIT © [dulajkavinda](https://github.com/dulajkavinda/performance/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdulajkavinda%2Fperformance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdulajkavinda%2Fperformance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdulajkavinda%2Fperformance/lists"}