feature: zone aware routing - Option 1#3117
Conversation
b15a1b3 to
2f8af02
Compare
2f8af02 to
e6350b4
Compare
1dc1dc5 to
6e33de7
Compare
|
Test run on 19/03: Endpointslices for the above application: Port-forwarded a routesrv pod, this pod's zone is set to eu-central-1c Response This returns the correct set of Endpoints. But when I got the same set of endpoints when I queried for Updated JTBD: Updated Tasks:
|
|
Test run on 20/3: The application has the following: Results: /routes/eu-central-1b - returns 3 endpoints as expected /routes/eu-central-1c - returns 6 endpoints as expected Context Currently dataclient does not do filtering based on zone. There should be two code paths:
JTBD When I configure skipper to use dataclient directly (without routesrv) in a multi-zone Kubernetes cluster / I want the dataclient to filter endpoints by my configured zone with threshold-based fallback / So that my skipper instance gets zone-aware routes without needing routesrv as an intermediary When I configure routesrv to use dataclient to serve zone-specific routes / I want the dataclient to return all endpoints with zone metadata unfiltered / So that routesrv can perform dynamic per-request zone filtering based on the requested zone Tasks
|
8f58563 to
751dc5e
Compare
| } | ||
|
|
||
| eps = state.GetEndpointsByService(ic.zone, ns, svcName, protocol, servicePort) | ||
| if state.enableEndpointSlices { |
There was a problem hiding this comment.
Kubernetes deprecated endpoints in favor of endpointslices and we used this switch only to enable it when it was more recent.
I think we can get rid of this.
Let's do the cleanup in a different PR.
szuecs
left a comment
There was a problem hiding this comment.
some small changes should be enough
751dc5e to
e7d1884
Compare
…one metadata - Ensure route construction always creates LBEndpoints with zone labels - Implement threshold-based zone filtering in routesrv when serving routes - Update expectations of testing zone-aware-routing in dataclient Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
d935e61 to
3a72be5
Compare
|
rebased on master |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
👍 |
MustafaSaber
left a comment
There was a problem hiding this comment.
I did one run, but I think I need to have another deeper run after discussion.
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
|
Somewhere in the merge process this PR got messed up, I do not see changes from this PR here :/ |
|
|
||
| for i := range left { | ||
| if left[i] != right[i] { | ||
| if left[i].Address != right[i].Address || left[i].Zone != right[i].Zone { |
There was a problem hiding this comment.
unrelated question.
is that situation possible - left[i].Address == right[i].Address && left[i].Zone != right[i].Zone?
There was a problem hiding this comment.
I do not think this is possible, because each pod gets assigned a unique IP within a cluster and a pod exists in a zone. Probably this could come if there is stale data, i.e. a pod dies, new one comes and there is some time with stale data. But I need to double check on this.
There was a problem hiding this comment.
Any time there is only one unique IP per pod, stale data would not change it, because then you would also have one unique IP per pod, maybe the pod does not exist, but the IP is unique at the old point of time.
check zone parameter for filtering mode - [x] When zone is empty (routesrv mode), return all endpoints with zone metadata - [x] When zone is set (direct skipper mode), filter by zone with threshold fallback - [x] Verify dataclient and routesrv modes work correctly --------- Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de> Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com> Co-authored-by: Sandor Szücs <sandor.szuecs@zalando.de> Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
I added a couple of missing tests that are only somewhat related to routesrv. These basically test that the change does not change valkey endpoints (these tests were completely missing before). |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
👍 |
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
Signed-off-by: greeshma1196 <greeshma.mathew@gmail.com>
|
👍 |
* zalando/skipper#3934 * zalando/skipper#3938 * zalando/skipper#3940 * zalando/skipper#3941 * zalando/skipper#3942 * zalando/skipper#3951 * zalando/skipper#3946 * zalando/skipper#3950 * zalando/skipper#3948 * zalando/skipper#3949 * zalando/skipper#3947 * zalando/skipper#3117 follow up on #10974 Signed-off-by: Mustafa Abdelrahman <mustafa.abdelrahman@zalando.de>
/routes/:zone