Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-14460 Active Kubernetes integration phase 2 - Advanced Features
  3. FLINK-16602

Rework the Service design for native Kubernetes deployment

    XMLWordPrintableJSON

Details

    Description

      At the moment we usually create two Services for a Flink application, one is the internal Service and the other is the so-called rest Service, the previous aims for forwarding request from the TMs to the JM, and the rest Service mainly serves as an external service for the Flink application. Here is a summary of the issues:

      1. The functionality boundary of the two Services is not clear enough since the internal Service could also become the rest Service when its exposed type is ClusterIP.
      2. For the high availability scenario, we create a useless internal Service which does not help forward the internal requests since the TMs directly communicate with the JM via the IP or hostname of the JM Pod.
      3. Headless service is enough to help forward the internal requests from the TMs to the JM. Service of ClusterIP type would add corresponding rules into the iptables, too many rules in the iptables would lower the kube-proxy's efficiency in refreshing iptables while notified of change events, which could possibly cause severe stability problems in a Kubernetes cluster.

       

      Therefore, we propose some improvements to the current design:

      1. Clarify the functionality boundary for the two Services, the internal Service only serves the internal communication from TMs to JM, while the rest Service makes the Flink cluster accessible from outside. The internal Service only exposes the RPC and BLOB ports while the external one exposes the REST port.
      2. Do not create the internal Service in the high availability case.
      3. Use HEADLESS type for the internal Service.

      Attachments

        Issue Links

          Activity

            People

              felixzheng Canbin Zheng
              felixzheng Canbin Zheng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m