diff --git a/docs/application-layer/locality-loadbalance.md b/docs/application-layer/locality-loadbalance.md index 8ec2eb5f..e4deacdf 100644 --- a/docs/application-layer/locality-loadbalance.md +++ b/docs/application-layer/locality-loadbalance.md @@ -3,25 +3,25 @@ sidebar_position: 9 title: Locality Load Balancing --- -This document introduces how to use Locality Load Balancing with Istio in the Kmesh. +This document explains how to use Locality Load Balancing with Istio in Kmesh. -> The current Kmesh Locality Load Balancing is at the L4 level and only support [Locality Failover](https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/failover/). +Note: Kmesh's current Locality Load Balancing operates at L4 and only supports [Locality Failover](https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/failover/). ## What is Locality Load Balancing? -A locality defines the geographic location of a workload instance within mesh. Locality Load Balancing in service mesh helps improve the availability and performance of services by intelligently routing traffic based on the location of the service instances. +A locality describes the geographic location of a workload instance in the mesh. Locality Load Balancing improves availability and performance by routing traffic based on the location of service instances. -We strongly recommend that you first read https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/ to understand what locality load balancing is. +We strongly recommend reading https://istio.io/latest/docs/tasks/traffic-management/locality-load-balancing/ for background on locality load balancing. ## Supported Modes and Configuration Methods for Kmesh -Currently, Istio's ambient mode only supports specifying a fixed locality load balancing policy by configuring specific fields. This includes two modes: PreferClose and Local. +Currently, Istio's ambient mode supports specifying a fixed locality load-balancing policy via configuration. Kmesh supports two modes: PreferClose and Local. ### 1. PreferClose -A failover mode that uses NETWORK, REGION, ZONE, and SUBZONE as the routingPreference. +Failover mode that uses NETWORK, REGION, ZONE, and SUBZONE as the routing preference. -- With `spec.trafficDistribution`(k8s >= beta [1.31.0](https://kubernetes.io/docs/concepts/services-networking/service/), isito >= [1.23.1](https://istio.io/latest/news/releases/1.23.x/announcing-1.23/)) +- With `spec.trafficDistribution` (k8s >= beta [1.31.0](https://kubernetes.io/docs/concepts/services-networking/service/), istio >= [1.23.1](https://istio.io/latest/news/releases/1.23.x/announcing-1.23/)) ```yaml spec: @@ -39,9 +39,9 @@ A failover mode that uses NETWORK, REGION, ZONE, and SUBZONE as the routingPrefe ### 2. Local -A strict mode that only matches the current NODE. +Strict mode that restricts traffic to the current node. -- spec.internalTrafficPolicy: Local (k8s >= beta 1.24 or >= 1.26) +- Set `spec.internalTrafficPolicy: Local` (k8s >= beta 1.24 or >= 1.26) ```yaml spec: @@ -52,14 +52,14 @@ A strict mode that only matches the current NODE. ### Prepare the environment -- Refer to [develop with kind](/docs/setup/develop-with-kind.md) -- We prepare three nodes in the cluster +- Refer to [develop with kind](/docs/setup/develop-with-kind.md). +- A three-node kind cluster is required. - istio >= 1.23.1 - k8s >= 1.31.0 - Ensure sidecar injection is disabled: `kubectl label namespace default istio-injection-` - Required images: - - docker.io/istio/examples-helloworld-v1 - - curlimages/curl + - `docker.io/istio/examples-helloworld-v1` + - `curlimages/curl` ```yaml kind create cluster --image=kindest/node:v1.31.0 --config=- <