This episode covers the distributed Wazuh architecture for production scale. We set up an indexer cluster with several nodes, a three-node manager cluster, understand the master and worker roles, load balancing agents, and high availability and failover for all components.

In episode 13, we covered Docker and Kubernetes integration. Now we go up another level: managing Wazuh itself so it's ready to scale. All installations so far were done on a single all-in-one node, which is enough for a lab or small environment.
In production, a single node becomes a single point of failure. If the manager dies, alerts stop; if the indexer dies, data is lost; if the dashboard dies, nobody can read anything. In episode 14, we'll build the distributed Wazuh architecture: a multi-node indexer cluster, a three-node manager cluster, and a dashboard, complete with load balancing and failover.
We start by understanding each component's role, then look at lab versus production topologies, and close with the steps to set up the cluster along with scale-out strategy.
The distributed Wazuh architecture consists of three component families whose roles must be understood.
Each component can be clustered on its own. This is the key to distributed architecture: scale each component according to its workload.
Don't mix lab and production needs.
A simple rule of thumb: the larger the event volume, the larger the indexer. The more agents, the larger the manager. The dashboard is rarely a bottleneck; a single instance with a second node for failover is enough.
The indexer uses an OpenSearch cluster with a quorum model. To avoid split brain, the number of nodes must be odd, at least three. All three nodes store the same data as replicas, so one node dying doesn't lose data.
Each indexer node needs a uniform cluster configuration. The cluster name must be the same, while the node name must be unique.
cluster.name: wazuh-cluster
node.name: indexer-1
discovery.seed_hosts:
- 10.0.0.11
- 10.0.0.12
- 10.0.0.13Change the node.name value to indexer-2 and indexer-3 on the following nodes. To communicate with the manager, Wazuh uses Filebeat. Filebeat on each manager is configured to send data to all indexer nodes.
output.elasticsearch:
hosts:
- https://10.0.0.11:9200
- https://10.0.0.12:9200
- https://10.0.0.13:9200With a complete host list, Filebeat automatically tries the next node if one dies. That's the basic failover for the data flow.
Managers can be clustered with master and worker modes. One node becomes the master, the rest are workers. The master manages cluster state, while workers process events from agents.
Cluster configuration is done in /var/ossec/etc/ossec.conf in the <cluster> section. The name and nodes must be consistent across all managers.
<cluster>
<name>wazuh-cluster</name>
<node_name>manager-1</node_name>
<node_type>master</node_type>
<key>c9d3b5e7a1f2b4c6d8e0a1b2c3d4e5f6</key>
<port>1516</port>
<bind_addr>0.0.0.0</bind_addr>
<nodes>
<node>10.0.1.11</node>
<node>10.0.1.12</node>
<node>10.0.1.13</node>
</nodes>
</cluster>On the second and third nodes, change node_name and node_type. Only one node may be the master.
This division of labor is important to understand:
If the master dies, workers don't immediately stop processing events, but cluster management capability is impaired. That's why the master needs good monitoring and backup.
Agents need to know where to send events. There are two main approaches.
Example of a load balancer configuration with nginx in front of the managers:
upstream wazuh_managers {
server 10.0.1.11:1514;
server 10.0.1.12:1514;
server 10.0.1.13:1514;
}
server {
listen 1514 udp;
proxy_pass wazuh_managers;
}With this configuration, agents only need to know a single address, and the load is spread evenly across the three managers.
High availability is born from the combination of all the layers above.
Info
Failover isn't without delay. When a worker changes, agents need a few seconds to reconnect. For truly real-time needs, consider adding capacity instead of chasing super-fast failover.
Wazuh provides API endpoints to monitor cluster status. Through the dashboard, we can see which nodes are alive, how many agents are connected to each worker, and whether synchronization is running normally.
curl -k -u wazuh-wui:SecretWUI \
https://10.0.1.11:55000/cluster/statusMonitor these metrics regularly. Overloaded workers signal the need for more nodes, while a full indexer node signals the need for more storage capacity.
In episode 14, we built the distributed Wazuh architecture for production scale. We understood the roles of indexer, manager, and dashboard, distinguished lab and production topologies, set up a three-node indexer cluster with quorum, a master and worker manager cluster, and load balancing and failover at every layer.
Key takeaways:
The architecture is ready, now let's strengthen its keys. In episode 15, we'll cover the Wazuh API, authentication, and security best practices: REST endpoints, SDKs, RBAC, single sign-on, up to TLS between components. See you there!