You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Let's try to put into practice the tools learned in the first type of test. Let's see how reactive our cluster is, or how long it takes to react to changes, as the workload on it varies. To put the cluster in "crisis", we will use the tools already encountered in the parent chapter.

As we have already done, we entrust the php-apache application to HPA and create a replica of infinite-calls. In this case we limit ourselves to creating only 1 replica because we want to test the reactivity of the cluster at a medium-low intensity load. As mentioned in the introductory part of this chapter, the data are the result of tests carried out on 3 different flavors, shown in descending order.

LoadTest (xLarge)
$ kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=10
$ kubectl scale deploy infinite-calls --replicas=1
$ kubectl get hpa -watch
NAME         REFERENCE               TARGETS    MINPODS   MAXPODS   REPLICAS   AGE
php-apache   Deployment/php-apache   0%/50%     1         10        1          41m	# Starting the workload
php-apache   Deployment/php-apache   207%/50%   1         10        1          42m
php-apache   Deployment/php-apache   207%/50%   1         10        4          42m
php-apache   Deployment/php-apache   207%/50%   1         10        5          43m
php-apache   Deployment/php-apache   55%/50%    1         10        5          43m
php-apache   Deployment/php-apache   57%/50%    1         10        5          44m
php-apache   Deployment/php-apache   57%/50%    1         10        6          44m	# Beginning of the plateau
php-apache   Deployment/php-apache   44%/50%    1         10        6          45m
php-apache   Deployment/php-apache   45%/50%    1         10        6          46m
php-apache   Deployment/php-apache   47%/50%    1         10        6          47m
php-apache   Deployment/php-apache   47%/50%    1         10        6          48m
php-apache   Deployment/php-apache   44%/50%    1         10        6          49m
php-apache   Deployment/php-apache   45%/50%    1         10        6          50m
php-apache   Deployment/php-apache   47%/50%    1         10        6          51m
php-apache   Deployment/php-apache   46%/50%    1         10        6          52m
php-apache   Deployment/php-apache   0%/50%     1         10        6          53m	# End of the plateau
php-apache   Deployment/php-apache   0%/50%     1         10        6          58m
php-apache   Deployment/php-apache   0%/50%     1         10        1          58m	# End of workload

We note that the reaction time of the cluster, from the rest position to the plateau and vice versa, is about 3-5 minutes. Of course, the same behavior can also be seen by analyzing the metrics obtained by Grafana (the stress namespace is the one used for our tests).

LoadTest (xLarge)

  • No labels