[ 
https://issues.apache.org/jira/browse/FLINK-16602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17060607#comment-17060607
 ] 

Canbin Zheng edited comment on FLINK-16602 at 3/19/20, 3:40 AM:
----------------------------------------------------------------

Hi, Yang Wang! I know your concern.

> About the rest port

For the new Service design, we could always have the rest Service, right? 
Therefore, no matter for the deployer or something else, we always could use 
the rest Service to forward traffic.

To sum up the reasons why to separate these two Services
 # The rest Service serves for the rest traffic while the internal one serves 
for the internal request from TMs to JM.
 # The rest Service is always created but the internal one only created in 
non-high availability setup.
 # We provide a new config option for people to customize annotations for the 
rest Service.

I think such a design covers the scenarios you mentioned above, right? And the 
big benefit is that we finally decouple these two Services.

> About the headless service

Yes, IPVS is recommended since 1.8, but we still have many k8s clusters that 
use iptables, right? I can see that headless Service is a more general option 
and it does no harm to make such a switch.


was (Author: felixzheng):
Hi, Yang Wang! I know your concern.

> About the rest port

For the new Service design, we could always have the rest Service, right? 
Therefore, no matter for the deployer or something else, we always could use 
the rest Service to forward traffic.

Again for the reasons why to separate the two Services
 # The rest Service serves for the rest traffic while the internal one serves 
for the internal request from TMs to JM.
 # The rest Service is always created but the internal one only created in 
non-high availability setup.
 # We provide a new config option for people to customize annotations for the 
rest Service.

I think such a design covers the scenarios you mentioned above, right? And the 
big benefit is that we finally decouple the two Services.

> About the headless service

Yes, IPVS is recommended since 1.8, but we still have many k8s clusters that 
use iptables, right? I can see that headless Service is a more general 
selection and it does no harm to make such a switch.

> Rework the Service design for Kubernetes deployment
> ---------------------------------------------------
>
>                 Key: FLINK-16602
>                 URL: https://issues.apache.org/jira/browse/FLINK-16602
>             Project: Flink
>          Issue Type: Improvement
>          Components: Deployment / Kubernetes
>    Affects Versions: 1.10.0
>            Reporter: Canbin Zheng
>            Priority: Major
>             Fix For: 1.11.0
>
>
> {color:#0e101a}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:{color}
>  # {color:#0e101a}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.{color}
>  # {color:#0e101a}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.{color}
>  # {color:#0e101a}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.{color}
>  
> {color:#0e101a}Therefore, we propose some improvements to the current 
> design:{color}
>  # {color:#0e101a}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.{color}
>  # {color:#0e101a}Do not create the internal Service in the high availability 
> case.{color}
>  # {color:#0e101a}Use HEADLESS type for the internal Service.{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to