Scaling Listener containers
Listeners are defined as StatefulSets in Kubernetes. Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod.
$(service name).$(namespace).svc.cluster.local.
listener-0.listener.default.svc.cluster.local
These can be configured in the Helm chart in the campaign-configMap.yaml file.
Like a Deployment, a StatefulSet manages the Pods that are based on identical container specifications. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods.
The location of Campaign shared home is $HOME_DIR/Campaign.
For the scaled instances of StatefulSet, listener-0
,
listener-1
,
listener-2
,..listener-n
, each instance has a
file system mapped on the mount location. For example,
$HOME_DIR/listener/listener-0.
Ordered scale up and scale down
- Ordered and graceful deployment and scaling.If you want to scale up the Listener pod, run the following command:
kubectl scale StatefulSets listener --replicas=2
- First instance gets deleted in the end.If you want to scale down the Listener pod, run the following command:
kubectl scale StatefulSets listener --replicas=1
Listener-Optimize merge
- Single scalable deployment in Kubernetes.
- Configuration and license driven config.xml.
- Listener integration
Cluster mode
- To enable scaling, by default, cluster mode must be
TRUE
.
Also perform the following listener-related scaling activities: