Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-18625

Maintain redundant taskmanagers to speed up failover

    XMLWordPrintableJSON

Details

    Description

      When flink job fails because of killed taskmanagers, it will request new containers when restarting. Requesting new containers can be very slow, sometimes it takes dozens of seconds even more. The reasons can be different, for example, yarn and hdfs are slow, machine performance is poor. In some product scenario, SLA is high and failover should be in seconds.

       

      To speed up the recovery process, we can maintain redundant slots in advance. When job restarts, it can use the redundant slots at once instead of requesting new taskmanagers.

       

      The implemention can be done in SlotManagerImpl. Below is a brief description:

      1. In construct method, init redundantTaskmanagerNum from config.
      2. In method start(), allocate redundant taskmanagers.
      3. In method start(), Change taskManagerTimeoutCheck() to checkValidTaskManagers().
      4. In method checkValidTaskManagers(), manage redundant taskmanagers and timeout taskmanagers. The idle taskmanager number must be not less than redundantTaskmanagerNum.
      • If less, allocate from resourceManager until equal.
      • If more, release timeout taskmanagers but keep at least redundantTaskmanagerNum idle taskmanagers.

      Attachments

        Issue Links

          Activity

            People

              Jiangang Liu
              Jiangang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: