Geuni Tech Documentation

website·Indexed 31 days ago

https://www.geuni.tech

A technical knowledge base covering software installation, configuration, and troubleshooting. Topics include distributed systems like Kafka, Elasticsearch, and Redis; web servers such as Nginx and OpenResty; DevOps tools like Git, Ansible, and Locust; and system administration for Linux (RHCSA/RHCE) and macOS.

Tokens
61K
Snippets
362
Records
410
Agent score
54%

What's inside Geuni Tech

  1. Overview of Redis Sentinel Features

    Redis Sentinel is a High Availability (HA) solution for Redis, distinct from Redis Cluster. It provides the following core functions:

    • Monitoring: Continuously monitors the status of master and slave instances to automate failover.
    • Notification: Notifies clients via Pub/Sub or executes shell scripts when a Redis instance goes down or a failover occurs.
    • Automatic Failover: When a master fails, Sentinel selects an appropriate slave to promote to master and reconfigures other slaves to follow the new master.
    • Configuration Provider: Acts as a service discovery mechanism for clients, providing current master and slave configuration to enable read/write splitting. It is not a proxy server.
  2. Overview of Redis Sentinel High Availability

    Redis Sentinel provides high availability (HA) for Redis instances by offering monitoring, notification, and automatic failover. It is a separate solution from Redis Cluster and is intended for users who do not require a full cluster setup.

    Key functions include:

    • Monitoring: Continuously checks the status of master and slave instances to automate failover.
    • Notification: Notifies clients via Pub/Sub or executes shell scripts when an instance goes down or a failover occurs.
    • Automatic Failover: When a master fails, Sentinel selects an appropriate slave to promote to master and reconfigures other slaves to follow the new master.
    • Configuration Provider: Acts as a service discovery mechanism for clients to locate the current master and slaves for read/write splitting (Sentinel is not a proxy server).
  3. Overview of Apache Kafka and its use cases

    Kafka is a distributed event streaming platform designed for large-scale data collection, processing, storage, and integration. It is primarily used for distributed data streams, stream processing, data integration, and publish/subscribe (pub/sub) messaging.
  4. Overview of Apache Kafka Core Concepts

    Apache Kafka is a distributed event streaming platform used for large-scale data collection, processing, storage, and integration. It is commonly used for data pipelines, real-time analytics, event streaming, and pub/sub architectures.

    Key architectural concepts include:

    • Topic: The basic unit of organization (similar to a table in a relational database) used to store events.
    • Partition: A physical division of a topic across multiple brokers to enable scalability and improve read/write performance. Order is guaranteed within a partition, but not across partitions.
    • Broker: A node/server in a Kafka cluster that manages topic partitions, handles producer/consumer requests, and manages data replication.
    • Offset: A sequential unique identifier for each message within a partition, used to track the consumer's position.
    • Replication: The process of copying partitions across multiple brokers for high availability. The 'leader replica' handles client requests, while 'follower replicas' sync data from the leader.
    • Producers: Clients that create and publish messages to Kafka topics.
    • Consumers: Clients that read and process messages from topics, tracking progress via offsets.
    • Consumer Group: A logical group of consumers that distribute the processing of a topic's partitions. Each partition is processed by only one consumer in the group.
  5. Introduction to Git for Version Control

    Git is a version control system that records changes to files over time, allowing users to revert to specific previous versions. It is used for software development, collaborative writing, and Personal Knowledge Management (PKM) with tools like Obsidian or Logseq. For beginners, using GUI tools such as Sourcetree, GitKraken, GitHub Desktop, or the built-in VS Code source control is recommended over the command line.
  6. Overview of Apache Kafka as a Distributed Event Streaming Platform

    Apache Kafka is a distributed event streaming platform designed for the collection, processing, storage, and integration of large-scale data. It is primarily utilized in environments requiring data pipelines, real-time analytics, event streaming, and publish/subscribe (pub/sub) messaging patterns.
  7. Overview of Elasticsearch

    Elasticsearch is a real-time, distributed search and analytics engine built on the Apache Lucene library. It is designed for efficiently storing, searching, and analyzing large volumes of data, with primary use cases including full-text search, log analysis, and application monitoring.
  8. Implement Active-Passive HA for Nginx using Keepalived

    To ensure service continuity for Nginx, Keepalived can be used to create an Active-Passive architecture where a Virtual IP (VIP) is shared between two servers. If the Master server fails, the VIP automatically switches to the Backup server. This setup requires Keepalived and Nginx installed on both nodes.
    sudo apt-get update
    sudo apt-get install keepalived nginx
  9. Basic usage of the find command

    The find command is used to search for files and directories in a directory structure based on a specified expression. It can also perform actions on the discovered files.
    find [options] [path...] [expression]
  10. Understand Git pointers and the HEAD reference

    Git uses pointers to reference specific commits, branches, or tags.

    • HEAD: A pointer to the current commit or branch being worked on. It is stored in .git/HEAD. If a specific commit is checked out directly, Git enters a 'Detached HEAD' state where HEAD points to a commit hash instead of a branch.
    • Branch Pointers: Pointers to the latest commit of a specific branch, stored in .git/refs/heads/.
    • Tag Pointers: Permanent pointers to specific commits, typically used for releases, stored in .git/refs/tags/.
    • Remote Branch Pointers: Pointers to branches in a remote repository, updated via git fetch, stored in .git/refs/remotes/.
  11. View detailed object information with git show

    git show displays detailed information about a specific commit, tag, or tree. It is primarily used to inspect the changes (diffs), author, date, and commit message of a specific point in history.
    # Show details of a specific commit
    git show abc1234
    
    # Show details of a specific tag
    git show v1.0.0
    
    # Show a specific file at a specific commit/tree
    git show HEAD:path/to/file
    
    # Show commit details in a concise one-line format
    git show --oneline abc1234
    
    # Show only the names of changed files
    git show --name-only abc1234
    
    # Show commit info using a custom format
    git show --format="%h - %an, %ar : %s" abc1234
    
    # Show commit message without the patch/diff
    git show --no-patch abc1234
  12. Understand Kafka Core Architecture Concepts

    Kafka is a distributed event streaming platform. Its architecture is based on the following core concepts:

    • Event: A record of an action or change (often expressed as a JSON message) consisting of a notification (trigger) and state (description).
    • Topic: The fundamental unit of storage, analogous to a table in a relational database. Topics are logical splits of data.
    • Partition: Physical splits of a topic log distributed across different nodes to enable horizontal scalability and higher throughput.
    • Broker: A single server/node in the Kafka cluster that hosts partitions and handles read/write requests.
    • Replication: The process of duplicating partitions across multiple brokers for high availability. The leader replica handles all requests, while follower replicas synchronize data from the leader.