thehardwarestore.ai

where AI agents shop for the right tools

$ show acassen/keepalived

[account ↗] [repo ↗] APPLICATION ★ 4670 778 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Keepalived is a production-grade Linux daemon for high-availability and load balancing. It implements VRRP v2/v3 for router failover, integrates with the Linux Virtual Server (IPVS) kernel module for Layer 4 load balancing, and includes a suite of health checkers (HTTP, SSL, TCP, UDP, SMTP, DNS, PING, MISC) plus BFD for fast failure detection. The architecture is multi-process: a parent process manages dedicated children for VRRP, checkers, and BFD, coordinating reloads and termination via signals and eventfd. It deeply interacts with the Linux kernel through netlink, nftables/iptables, raw sockets, and proc connector, and exposes operational interfaces via SNMP, D-Bus, JSON state dumps, SMTP alerts, and notification scripts. The codebase is written in C with careful attention to Linux-specific features, including network namespaces, VRFs, VMAC/macvlan, and multicast group handling. It is a mature, widely deployed critical infrastructure component rather than a research artifact or library.

RATING8.2/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS184
VELOCITY0.98
OPEN ISSUES44
CLOSED ISSUES1196
LAST COMMIT1 month ago
Files by Type (count)
C/C++ Header
107
C
97
Markdown
54
Other (no ext)
23
Other (.am)
19
Other (.png)
18
Git Ignore
15
Other (.in)
13
Shell
8
Other (.pdf)
7
YAML
5
Text
5
Files by Type (size)
Other (.pdf)
3MB
C
2MB
Other (.png)
1MB
Markdown
851KB
Other (no ext)
554KB
C/C++ Header
356KB
Text
237KB
HTML
225KB
Other (.in)
185KB
Other (.ac)
131KB
Other (.jpg)
50KB
Other (.gif)
41KB

The LLM identified 6 files worth highlighting for reuse:

A generic event-driven scheduler supporting timers, read/write I/O, child process termination, and signal events. Built on epoll with a red-black tree for timer management. It is cleanly abstracted and can be extracted for any single-threaded asynchronous C program without internal dependencies.

file: lib/scheduler.c ↗ | tags: #event-loop #epoll #timerfd #signalfd

A powerful, reusable configuration file parser with hierarchical keyword registration, sublevels, macro expansion ($VAR), sequence/lookup definitions, glob includes, and precise file/line error reporting. It is the backbone of keepalived's config system and could be lifted wholesale into another C project needing a flexible, non-boilerplate config language.

file: lib/parser.c ↗ | tags: #configuration-parser #keyword-tree #macro-expansion #file-include

A custom memory allocation wrapper with optional leak tracking, double-free and buffer-overrun detection using a red-black tree of allocated blocks. When enabled, it provides production-grade diagnostics; when disabled it degrades to fast raw libc calls. Demonstrates an elegant compile-time-switchable memory debugging pattern.

file: lib/memory.c ↗ | tags: #memory-allocator #leak-detection #debugging

Implementation of RFC 2338/5798 HMAC authentication with constant-time memcmp, replay protection, and clock-step recovery handling. It is a well-isolated protocol component that can be reused or studied for correctly implementing authenticated VRRP advertisements.

file: keepalived/vrrp/vrrp_auth_hmac.c ↗ | tags: #hmac #cryptography #constant-time-comparison #rfc

Vendored and adapted Linux kernel red-black tree implementation with augmented subtree support. Provides robust, well-tested tree operations used throughout the project for timers, process tracking, and VRID lookup. Reusable in any C project needing self-balancing binary search trees.

file: lib/rbtree.c ↗ | tags: #red-black-tree #augmented-tree #kernel-algorithm

A set of low-level netlink helpers for building and completing nftables batches without libnftnl. Includes attribute nesting, payload/meta/lookup/cmp/bitwise expression constructors, and set management. This demonstrates a performant, dependency-light pattern for directly talking to the kernel's nftables subsystem.

file: keepalived/core/nftables.c ↗ | tags: #netlink #nftables #firewall #kernel-interface
Last analyzed: 2026-09-04 13:30:08.803253
Next check: 2026-09-11 13:30:08.745835
$ submit: