istio icon indicating copy to clipboard operation
istio copied to clipboard

locality use

Open WangChao0326 opened this issue 3 years ago • 5 comments

Bug Description

We are currently using the locality feature for nearby access. For the test environment, there will be many sub-environments. We regard the sub-environments as regions, and different sub-environments are regarded as different regions. This allows priority access to the same sub-environment. But now there is a need to specify the sub-environment of the request to a service through the URL from http request, such as http://XXX?subenv=XXX, the subenv of queryString to specify the sub-environment of the request. If the current traffic rules are not changed , what features does istio have to do?

Version

Additional Information

No response

WangChao0326 avatar May 10 '22 09:05 WangChao0326

Guess you wanto route to specific env services by query param. One way is to define subsets of different envs with DestinationRule, and then you specify a VirtualService to route traffic to whatever destination you want.

hzxuzhonghu avatar May 11 '22 02:05 hzxuzhonghu

We want to use locality, whether the client can control the nearest access by itself。For example, the client is deployed in region-a, and the server has region-a, region-b, and region-c. We enable nearby access by default, so that the client of region-a can access the server of region-a. But sometimes, the client of region-a wants to access the server of region-b. At present, our design is that the http request is sent to the istio gateway, and then the istio gateway forwards it to the corresponding service. At this point, it can be said that the client is the gateway. Can the client control which region to access nearby?

WangChao0326 avatar May 11 '22 09:05 WangChao0326

Why not, please take a look at istio official doc about locality loadbalancing.

hzxuzhonghu avatar May 12 '22 01:05 hzxuzhonghu

We want to specify the client's region based on the request, such as queryString,not the region where the client is actually located。I didn't find the relevant usage on the doc,Is there any way for istio to do this?

WangChao0326 avatar May 12 '22 12:05 WangChao0326

🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2022-05-12. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

istio-policy-bot avatar Aug 25 '22 05:08 istio-policy-bot