Create Kafka Cluster with 3 nodes
Edit file “server.properties” with different broker.id and advertised.listeners: Delete folder “logs” which defined in config (“/home/kafka/logs”) in secondary nodes and folder “zookeeper”. Stop all nodes then restart all node: Important! In node 01: Open meta.properties file in /home/kafka/logs. Copy cluster.id value. Paste cluster.id value to /home/kafka/logs/meta.properties in other node, for the same cluster. For multi…
Create Redis Cluster with few steps
With 3 computers (10.5.10.1, 10.5.10.2, 10.5.10.3). My example is Rocky Linux/ Centos Step 1: Install Redis on computer Step 2: Edit /etc/redis.conf: Step 3: Open Firewall on 7001 & 17001 (7001+10000): Step 4: Run Redis Server with command: Repeat all steps above on other computer with other port (7002, 7003) Step 5: Create cluster Open…
Build NestJS Library
To build a NestJS library, you can follow these steps: Create a new NestJS project using the NestJS CLI: Change the working directory to your library folder: Create a new library module using the NestJS CLI: This will generate a new folder my-library inside the src folder. This folder contains the library module and its…
MongoDB error: child process failed, exited with error number
Check all path in /etc/mongod.conf. If files or folders not exist, create them then:
Compare strings and calculate scores, find the closest string
Compare strings and calculate scores, find the closest string by JS:
Store compressed data in MongoDB and decompress it
Storing compressed data in MongoDB and decompressing it is a necessary task when you store large data files like Logs. Database schema Interface Upload Controller Method: POST – ‘multipart/form-data‘ Field name: file Type: Use .zip file for lightweight Allows to use multiple text files in a zip file Upload Service Input: file Extract the zip…
NGINX – Installation and configuration
It’s easy to install NGINX from the repo. For example on RHEL/ Centos/ Rocky Linux: So, this tutorial I want to show you how to install from source. You can read something here for NGINX and streaming: [Full install] Streaming HLS with Nginx & FFMPEG (quicktricks.net). Or below: Preparing for the installation Install some required…