networkservicemesh / deployments-k8s

Apache License 2.0
42 stars 34 forks source link

Feature: automatic nsc connect to nse registered with the NS after nsc is initialized and running #9889

Closed barby1138 closed 10 months ago

barby1138 commented 1 year ago

Hi All,

Thank you for your great work!!!

I have another question / feature request which could be useful for me and, I hope, for others.

Can we implement subj. Example: I have NS-1 describes that all nsc connects to all nse. I brought up ncc-1 and nse-1 and NS-1 so nsc-1 connected to nse-1. after some time... I want to bring up nse-2 which declares NS-1 in NSM_SERVICE_NAMES (part of NS-1)

I want client to automatically connect to nse-2 also.

I want to bring up / down nse dynamically to optimize cloud resource allocation / usage.

What do you think? Thank you!!!

barby1138 commented 1 year ago

This is related to: reconnect services dynamically #9767 Because in case of NSC crash / redeploy it yes will connect to nse-2 - so brings inconsistent behavior. This also could be resolved same way by adding watcher on new nse registered inside NS it will also make stateless NSC to NSE connect (no need to wait for NSE to bring up) which better matches CN / k8s design

Have a good day!!!

barby1138 commented 1 year ago

Hi guys, Will we proceed here? Is my explanation clear or more details needed? Thanks!!!

denis-tingaikin commented 11 months ago

Hello @barby1138 ,

For the best utilisation of resources, we have scale from zero topolgy, for example: https://github.com/networkservicemesh/deployments-k8s/tree/main/examples/features/scale-from-zero.

Also, if setup requires dynamic changes, vl3 network might be a good choice: https://github.com/networkservicemesh/deployments-k8s/tree/main/examples/features/vl3-basic

And we also have an example of combination of these features ;) https://github.com/networkservicemesh/deployments-k8s/tree/main/examples/features/vl3-scale-from-zero

I see the idea of automatically connecting a client to a group of nse interesting, but I don't see a strong use case that proves the need for this feature at this moment. Do you have something in mind?