How awslabs/flowgger works
Project type and purpose
• Flowgger is a standalone, full-stack Rust service (single binary) for high-throughput log collection and routing.
• It ingests logs over various transports, decodes them from one format, optionally merges or splits multi-line records, re-encodes them, and forwards them to downstream systems (Kafka, Graylog, Redis, other Flowgger instances, files, etc.).
File structure
• Top-level:
• Cargo.toml, build.rs, src/main.rs → Rust binary entrypoint
• src/lib.rs → core library shared by binary/tests
• docker/ → containerization (Dockerfile, entrypoint.sh)
• flowgger.toml → default configuration example
• src/flowgger/: main application modules
• input/ → all input plugins (stdin, file, TCP, TLS, UDP, Redis)
• decoder/ → parsers for GELF, LTSV, RFC-3164, RFC-5424, Cap’n Proto
• splitter/ → break multi-record streams into messages
• merger/ → combine partial lines into complete records
• encoder/ → formatters for various output protocols
• output/ → sinks (Kafka, file, TLS, debug)
• config.rs, record.rs, utils/ → configuration loader, in-memory record model, common functions
• tests/ and record.capnp → test fixtures and Cap’n Proto schema for high-speed messaging
Extract additional architecture insights from README
• Single-process, asynchronous pipelines
• Paranoid validation at each stage
• Extensible plugin-style modules for inputs, decoders, encoders, outputs