Auto scale out occurs when the average database CPU utilization or number of connections exceeds the threshold. Select whether the criteria for auto scale out is CPU usage or the number of connections, depending on the resource that is the bottleneck of the database.
The maximum number of replica containers, excluding the master container, is 15.
Performs a scale out if the average CPU utilization of all pods (primary pods and all replica pods) in the FEPCluster exceeds the threshold for a period of time.
CPU utilization is calculated with the value specified in spec.fep.mcSpec.requests.cpu specified for the FEPCluster custom resource as the denominator.
Performs a scale out if the average number of connections for all pods (primary pods and all replica pods) in the FEPCluster exceeds the threshold for a period of time.
Specify the threshold for the number of connections to perform automatic scale-out with a value less than or equal to the max_connections parameter of the FEP server.
The prerequisites for using the scale out feature based on the number of connections are as follows.
The monitoring feature (see "2.3.8 Monitoring & Alert (FEPExporter)") is enabled.
Metrics for the number of FEP server connections are collected by the monitoring feature.
A custom metrics server is installed in the OCP/Kubernetes cluster.
The custom metrics server publishes the average number of connections collected by the monitoring feature.
When using the scale out feature based on the number of connections, the auto scale out feature requests the custom metrics server for metrics associated with the following Kubernetes resources.
kind: FEPCluster
apiVersion: fep.fujitsu.io/v2
name: Name of FEP Cluster
namespace: The name of the namespace in which FEP Cluster is deployed
The name of the requested metric is the name specified in the metricName parameter.
This metric should represent the average number of connections for each pod in the specified FEPCluster.
If you want to use the scale out feature based on the number of connections, deploy FEPExporter according to the procedure of "4.3 Deploying FEPExporter".
If FEPCluster metrics are collected by FEPExporter in standalone mode (see "4.4 FEPExporter in Standalone Mode"), the scale out feature based on the number of connections is not available.
Note
When using the auto scale out feature, the FEPCluster sync mode should be "off".
Precautions when designing auto scale out
The auto scale out feature adds replicas one at a time. In addition, additional replicas take time to service, depending on the environment and the amount of data stored. As a result, replica growth may not be able to keep up with the increased load.
Even if the auto scale out feature increases the number of replicas, incoming requests are not given priority to those replicas. As a result, existing FEP instances may continue to be temporarily overloaded after the number of replicas increases.
The auto scale out feature increases the number of replica requests that can be handled only by reference requests to the database. Requests with updates continue to be processed on the primary FEP instance. Therefore, the auto scale out feature may not reduce the load on the primary FEP instance.
Currently, the auto scale out feature does not delete replicas (reduce the number of replicas). If the load decreases after the number of replicas increases due to a temporary increase in load, the number of replicas remains increased. If necessary, manually change the number of replicas.
If you want to use Auto Scale Out, set the parameter to FEPClusterCR.
Refer to "FEPCluster Parameter" in the Reference for FEPCluster parameters.