Add metrics based horizontal autoscaling support for NATS cluster
sonttran opened this issue · comments
As we already have nats-operator to scale the number of instance of NATS cluster up and down in k8s
, it would be great to be able to add metrics based horizontal autoscaling support so NATS cluster can increase/decrease number of instances horizontally on its own based on load.
Something like:
apiVersion: nats.io/v1alpha2
kind: NatsCluster
metadata:
name: nats-cluster
spec:
version: "2.1.8"
size: 3 # default cluster instance
max: 100 # max cluster instance
min: 3 # min cluster instance
targetCPUUtilizationPercentage: 75 # will spin up new instance if pod hitting this threshold
pod:
resources:
limits:
cpu: "200m"
memory: "500Mi"
requests:
cpu: "100m"
memory: "100Mi"
Thank you the team for the work so far on NATS. Great product!
cc @wallyqs