Skip to content

Commit 7c157d3

Browse files
committed
[zh] sync service-traffic-policy.md
1 parent d785a4d commit 7c157d3

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
---
22
title: 服务内部流量策略
33
content_type: concept
4-
weight: 45
4+
weight: 75
5+
description: >-
6+
如果集群中的两个 Pod 想要通信,并且两个 Pod 实际上都在同一节点运行,
7+
**服务内部流量策略** 可以将网络流量限制在该节点内。
8+
通过集群网络避免流量往返有助于提高可靠性、增强性能(网络延迟和吞吐量)或降低成本。
59
---
610
<!--
711
---
812
reviewers:
913
- maplain
1014
title: Service Internal Traffic Policy
1115
content_type: concept
12-
weight: 45
16+
weight: 75
17+
description: >-
18+
If two Pods in your cluster want to communicate, and both Pods are actually running on
19+
the same node, _Service Internal Traffic Policy_ to keep network traffic within that node.
20+
Avoiding a round trip via the cluster network can help with reliability, performance
21+
(network latency and throughput), or cost.
1322
---
1423
-->
1524

@@ -23,7 +32,7 @@ internal traffic to endpoints within the node the traffic originated from. The
2332
"internal" traffic here refers to traffic originated from Pods in the current
2433
cluster. This can help to reduce costs and improve performance.
2534
-->
26-
_服务内部流量策略_ 开启了内部流量限制,只路由内部流量到和发起方处于相同节点的服务端点
35+
**服务内部流量策略**开启了内部流量限制,将内部流量只路由到发起方所处节点内的服务端点
2736
这里的”内部“流量指当前集群中的 Pod 所发起的流量。
2837
这种机制有助于节省开销,提升效率。
2938

@@ -38,13 +47,13 @@ _服务内部流量策略_ 开启了内部流量限制,只路由内部流量
3847
The `ServiceInternalTrafficPolicy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
3948
is a Beta feature and enabled by default.
4049
When the feature is enabled, you can enable the internal-only traffic policy for a
41-
{{< glossary_tooltip text="Services" term_id="service" >}}, by setting its
50+
{{< glossary_tooltip text="Service" term_id="service" >}}, by setting its
4251
`.spec.internalTrafficPolicy` to `Local`.
4352
This tells kube-proxy to only use node local endpoints for cluster internal traffic.
4453
-->
45-
`ServiceInternalTrafficPolicy`
54+
`ServiceInternalTrafficPolicy`
4655
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) 是 Beta 功能,默认启用。
47-
启用该功能后,你就可以通过将 {{< glossary_tooltip text="Services" term_id="service" >}} 的
56+
启用该功能后,你就可以通过将 {{< glossary_tooltip text="Service" term_id="service" >}} 的
4857
`.spec.internalTrafficPolicy` 项设置为 `Local`
4958
来为它指定一个内部专用的流量策略。
5059
此设置就相当于告诉 kube-proxy 对于集群内部流量只能使用本地的服务端口。
@@ -113,7 +122,7 @@ kube-proxy 基于 `spec.internalTrafficPolicy` 的设置来过滤路由的目标
113122
to `Local` on a Service. It is possible to use both features in the same cluster
114123
on different Services, just not on the same Service.
115124
-->
116-
* 在一个Service上,当 `externalTrafficPolicy` 已设置为 `Local`时,服务内部流量策略无法使用。
125+
* 在一个 Service 上,当 `externalTrafficPolicy` 已设置为 `Local`时,服务内部流量策略无法使用。
117126
换句话说,在一个集群的不同 Service 上可以同时使用这两个特性,但在一个 Service 上不行。
118127

119128
## {{% heading "whatsnext" %}}
@@ -124,5 +133,5 @@ kube-proxy 基于 `spec.internalTrafficPolicy` 的设置来过滤路由的目标
124133
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
125134
-->
126135
* 请阅读[拓扑感知提示](/zh-cn/docs/concepts/services-networking/topology-aware-hints)
127-
* 请阅读[Service 的外部流量策略](/zh-cn/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)
136+
* 请阅读 [Service 的外部流量策略](/zh-cn/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip)
128137
* 请阅读[用 Service 连接应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/)

0 commit comments

Comments
 (0)