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

Compare with Current View Page History

« Previous Version 6 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 2 replicas, 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=20
$ kubectl scale deploy infinite-calls --replicas=2
$ kubectl get hpa --watch
NAME         REFERENCE               TARGETS    MINPODS   MAXPODS  REPLICAS   AGE
php-apache   Deployment/php-apache   0%/50%     1         20       1          11m	# Starting the workload
php-apache   Deployment/php-apache   119%/50%   1         20       1          11m
php-apache   Deployment/php-apache   119%/50%   1         20       3          11m
php-apache   Deployment/php-apache   180%/50%   1         20       3          12m
php-apache   Deployment/php-apache   180%/50%   1         20       6          12m
php-apache   Deployment/php-apache   180%/50%   1         20       11         13m
php-apache   Deployment/php-apache   51%/50%    1         20       11         13m	# Beginning of the plateau
php-apache   Deployment/php-apache   49%/50%    1         20       11         14m
php-apache   Deployment/php-apache   52%/50%    1         20       11         15m
php-apache   Deployment/php-apache   50%/50%    1         20       11         16m
php-apache   Deployment/php-apache   51%/50%    1         20       11         17m
php-apache   Deployment/php-apache   50%/50%    1         20       11         18m
php-apache   Deployment/php-apache   48%/50%    1         20       11         19m
php-apache   Deployment/php-apache   50%/50%    1         20       11         20m
php-apache   Deployment/php-apache   49%/50%    1         20       11         21m
php-apache   Deployment/php-apache   49%/50%    1         20       11         23m	# End of the plateau
php-apache   Deployment/php-apache   24%/50%    1         20       11         24m	
php-apache   Deployment/php-apache   0%/50%     1         20       11         25m
php-apache   Deployment/php-apache   0%/50%     1         20       11         29m
php-apache   Deployment/php-apache   0%/50%     1         20       6          29m
php-apache   Deployment/php-apache   0%/50%     1         20       6          30m
php-apache   Deployment/php-apache   0%/50%     1         20       1          30m	# End of workload

We note that the reaction time of the cluster, from the rest position to the plateau and vice versa, is about 4-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