Miss any of our Open RFC calls?Watch the recordings here! »

p3x-cluster-communication-with-ipc-or-redis

1.0.22-56 • Public • Published

NPM

Build Status Uptime Robot ratio (30 days)

💬 This is a replication package that can communicate with either with IPC on one server or with Redis using a farm of multiple servers v1.0.22-56

This is an open-source project. Star this repository, if you like it, or even donate! Thank you so much! :)

I run my own server with dynamic IP address, so, it may happen, that the server can not be reachable for about max 15 minutes, due to nature of the dynamic DNS. The server may also be unreachable, when I backup the SSD with Clonzilla (very rarely) or an electrical issue (but this should not happen again). When the server is down, please hang on for 15-30 minutes and the server will be back up.

All my domains (patrikx3.com and corifeus.com) could have errors, since I am developing in my free time. However, it is usually stable.

Bugs are evident™ - MATRIX️

Node Version Requirement

>=10.5.0 

Built on Node

v10.8.0

The async and await keywords are required.

Install NodeJs:
https://nodejs.org/en/download/package-manager/

Description

The use case is that, today, threads are not pushing enough power - software threads can get the process stuck.

To increase the output processing, we also can empower the speed with multiple processes, besides, you can increase this speed with using multiple servers - farms / farming.

For this use case, it solves the communication, with farms / farming or multiple processes.

There are 2 modes for this communication:

  • IPC on 1 server
    • simplest
      • master
      • worker
      • singleton (optional)
  • REDIS on any amount of server
    • every server will have a master
    • the Redis cluster settings will be written in the documentation
    • more complex
      • mother master (if a mother is died, will move to another master and notify)
      • master
      • worker
      • singleton (optional)

Scenario 1

The first usage scenario is the p3x-npm-registry, because, first, I started with redis, but I understood, that, given, I only use for now 1 server, I can use simple IPC as well and gain speed.

I rarely use threads, today, given, CPU cores / hyper-threads are increasing and non blocking programming can be really fast.

Scenario 2

We can use load balancing, eg. NGINX. http://nginx.org/en/docs/http/load_balancing.html

Test

Redis

npm run test-redis

README


P3X-CLUSTER-COMMUNICATION-WITH-IPC-OR-REDIS Build v1.0.22-56

Like Corifeus @ Facebook Donate for Corifeus / P3X Contact Corifeus / P3X

P3X Sponsors

IntelliJ - The most intelligent Java IDE

JetBrains NoSQLBooster

The Smartest IDE for MongoDB

Install

npm i p3x-cluster-communication-with-ipc-or-redis

DownloadsWeekly Downloads

4

Version

1.0.22-56

License

MIT

Unpacked Size

9.48 kB

Total Files

7

Last publish

Collaborators

  • avatar