ClickHouse Sharding and Replication in NFA
Noction Flow Analyzer (NFA) uses ClickHouse to store and analyze traffic information collected from NetFlow, sFlow, IPFIX, J-Flow, and NetStream exporters. In a typical installation, the ClickHouse database runs on the same server as NFA. This arrangement keeps deployment and administration relatively simple, and it works well when the server has enough resources for incoming data, historical storage, and analytical queries.
Larger monitoring environments can have different requirements. A growing number of exporters, longer retention periods, or more demanding reports may put increasing pressure on the database server. Some operators also want a second copy of their stored traffic data so that an individual storage-node failure doesn’t leave the dataset inaccessible.
NFA’s sharding-enabled ClickHouse architecture addresses these requirements by supporting multiple database shards and replicas. The implementation retains a single-node default configuration. Additional ClickHouse servers can be introduced when storage capacity or redundancy becomes a concern, without requiring a complete NFA application installation on every database node. The architecture covers both flow data and BGP routing information. Each uses a sharding key based on its own record attributes, while the underlying distributed storage and replication mechanisms remain the same.
Starting with the existing NFA database structure
NFA uses MySQL for Continue reading
