Package autoscaling

Class LoadSimulationPipeline


  • public class LoadSimulationPipeline
    extends java.lang.Object
    Example pipeline which simulates fluctuating load from zero to a defined max, and vice-versa. The goal is to simulate a traffic pattern which traverses all possible stages between zero load and peak load. The load curve is computed using a sine function.

    The pipeline has defaults but can be parameterized as follows:

      repeatsAfterMs:  The period length after which the initial load will be reached again.
      maxLoadPerTask:  Each task's max load is presented by a double which is similar to the Unix CPU load
                         in the sense that at least maxLoad amount of subtasks are needed to sustain the load.
                         For example, a max load of 1 represents 100% load on a single subtask, 50% load on two subtasks.
                         Similarly, a max load of 2 represents 100% load on two tasks, 50% load on 4 subtasks.
    
                         Multiple tasks and branches can be defined to test Flink Autoscaling. The format is as follows:
                           maxLoadTask1Branch1[;maxLoadTask2Branch1...[\n maxLoadTask1Branch2[;maxLoadTask2Branch2...]...]
    
                        A concrete example: "1;2;4\n4;2;1"
                          Two branches are created with three tasks each. On the first branch, the tasks have
                          a load of 1, 2, and 3 respectively. On the second branch, the tasks have the load reversed.
                          This means, that at peak Flink Autoscaling at target utilization of 0.5, the parallelisms of
                          the tasks will be 2, 4, 8 for branch one and vise-versa for branch two.
     
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoadSimulationPipeline

        public LoadSimulationPipeline()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception