{question}
What are the general recommendations when implementing Load Balancers in SingleStore?
{question}
{answer}
This article explains the optimal way to configure Load Balancers (LBs) for a SingleStore cluster in front of the Child Aggregator (CA) and Master Aggregator (MA) nodes to ensure efficient workload distribution and minimize single points of failure.
SingleStore clusters include two types of aggregator nodes: Master Aggregators (MAs) and Child Aggregators (CAs).
MAs manage cluster-wide metadata, store information from
information_schematables, coordinate all DDL and DML operations, and handle query routing internally.CAs are primarily used for query routing, distributing queries to leaf nodes for execution.
If a Load Balancer is configured over both MA and CA nodes, requests will be distributed equally across all aggregators. This configuration has the following implications:
All requests, including DDL, may reach either the MA or the CAs.
DDL queries are still executed by the MA, even if routed through a CA, due to internal forwarding.
However, this setup increases the exposure of the MA to user queries and can create the risk of overload.
Best Practices and Recommendations
To improve availability and reduce the load on the MA:
Add additional CA nodes to increase query handling capacity.
Place the Load Balancer only in front of the CA nodes.
Route all application queries exclusively through the CA Load Balancer.
DDL statements and reference table DML will continue to be automatically forwarded to the MA as required. The MA should remain accessible only for administrative operations and specific DML queries, as outlined in the documentation linked below.
DML Forwarding for Reference Tables
If the types of queries mentioned in the documentation do not apply to your workload, the Load Balancer can be placed in front of all aggregator nodes, including the MA. In this configuration, requests are routed in a round-robin fashion across all nodes, ensuring that the workload is evenly distributed among the aggregators.
{answer}