Comments (8)
@edwarnicke Previously we fixed another problem that you pointed. As I remember it was related to proccesing clientInfo labels. We fixed the problem in https://github.com/networkservicemesh/deployments-k8s/pull/1427/files#diff-01c4adc6e8ef21f0e9bd8be14010662eea9b27225b3a51ded0e39cdb5d0614f4R15
It would be nice to see the expected network service for this scenario. As I understand you mean that it should work with ns:
---
apiVersion: networkservicemesh.io/v1
kind: NetworkService
metadata:
name: autoscale-icmp-responder
namespace: nsm-system
spec:
payload: ETHERNET
name: autoscale-icmp-responder
matches:
- source_selector:
routes:
- destination_selector:
app: nse-icmp-responder
nodeName: "{{.nodeName}}"
Could you please say more about expectations?
from deployments-k8s.
In discover
server we select first suitable match and then unconditionally end search.
So if we were to separate endpoints in the scale-from-zero example to 2 matches, then only first of the matches will ever be used, because of behavior of discover.
We were considering making discover fall through matches that don't resolve to any endpoints, to make it behave as advertised in the scale-from-zero proposal. After some considerations we rejected this change for the following reason:
Right now cluster admin can deploy network service with matches X
and Y
, and be sure that if a request matches X
then it will never-ever go to route from Y
.
But if we were to skip matches without live endpoints, then if endpoint(s) from match X
are temporary unavailable, then we would go to match Y
, and there is nothing that cluster admin can do about this. So, matches would become unreliable.
So we decided to place both routes in one match.
I believe that this is how matches were intended to be used. Am I wrong here?
from deployments-k8s.
roundrobin
should be round robining among candidates.
discover
discovers candidates. Round robin selects among them.
If roundrobin is functioning correctly... then the current approach will half the time pick the supplier, even when there's a topological match available.
Right now cluster admin can deploy network service with matches X and Y, and be sure that if a request matches X then it will never-ever go to route from Y.
Only returning the candidates from the first match matched is necessary to correctly implement composition.
But if we were to skip matches without live endpoints, then if endpoint(s) from match X are temporary unavailable, then we would go to match Y, and there is nothing that cluster admin can do about this. So, matches would become unreliable.
This makes matches less, not more, reliable, because it may result in connecting clients to inappropriate clients.
The central issues are that
- For Composition to work correctly, we need to return the candidates from the first match that matches. Even if there are none. Even if none are available.
- For Scale from Zero to work correctly, we need to be able to 'fallthrough' if there are no candidates for a match.
I had proposed (I think to Vlad, when he was looking deeply at these things) that the correct approach here was to add a
fallthrough
property to a match that defaulted to false. If a match matches and has no candidates, then we continue to the next match if and only if the 'fallthrough' property is true for that match.
from deployments-k8s.
@edwarnicke Could you, please, confirm, before i've started changing code, that i understand correctly and we want matches in scale-from-zero example to be like:
---
apiVersion: networkservicemesh.io/v1
kind: NetworkService
metadata:
name: autoscale-icmp-responder
namespace: nsm-system
spec:
payload: ETHERNET
name: autoscale-icmp-responder
matches:
- source_selector:
routes:
- destination_selector:
app: nse-icmp-responder
nodeName: "{{.nodeName}}"
- source_selector:
routes:
- destination_selector:
app: icmp-responder-supplier
- fallthrough: true
from deployments-k8s.
@Mixaster995 It seems to me you have missed fallthrough
from deployments-k8s.
@denis-tingaikin thanks, modified question
from deployments-k8s.
More like:
---
apiVersion: networkservicemesh.io/v1
kind: NetworkService
metadata:
name: autoscale-icmp-responder
namespace: nsm-system
spec:
payload: ETHERNET
name: autoscale-icmp-responder
matches:
- source_selector:
fallthrough: true
routes:
- destination_selector:
app: nse-icmp-responder
nodeName: "{{.nodeName}}"
- source_selector:
routes:
- destination_selector:
app: icmp-responder-supplier
from deployments-k8s.
@edwarnicke Currently NS for scale from zero looks this https://github.com/networkservicemesh/deployments-k8s/blob/main/examples/features/scale-from-zero/autoscale-netsvc.yaml#L1-L19
Be free to reopen issue if we missed something.
from deployments-k8s.
Related Issues (20)
- Improve cronjob for CVEs scanning in docker images
- add hostNetwork: true for alpine in Kernel2Ethernet2Kernel HOT 5
- Fix `CRITICAL` and `HIGH` issues from CVEs scanner HOT 1
- Adding a new Network Services Endpoind to the running NSC HOT 4
- about policy-based-routing how to HOT 3
- about ovs-forward HOT 10
- CVEs Scanner should merge the same CVEs
- Add more aggressive forwarders restart test HOT 2
- Add IPv6 vL3 IPAM example
- Impossible to start basic deployment on MacOS/Arm64 HOT 5
- Add a workflow that automatically merges PRs with updates from cmd repositories
- about admission-webhook-k8s-5cd8c66698-pwxf7 cause some error
- Question about change-nse-dinamically example HOT 9
- alpine cant use curl with NSM dns HOT 1
- [R&D] Add examples with using VMWare Tanzu HOT 2
- TestK8sMonolithSuite/External_nsc/TestKernel2IP2Kernel is unstable HOT 2
- Multiple services request within ext_client scenario HOT 4
- After component restart there are more interfaces in NSE than expected HOT 3
- NSMgr v1.12.1-rc.1 causes latency spikes at certain traffic level HOT 4
- About nsm deployment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deployments-k8s.