-
-
Notifications
You must be signed in to change notification settings - Fork 32
Does GNMIC support multiple sessions to Server within the same connection ?? #644
Comments
Hi, Can you describe a bit more what kind of sessions you are trying to create (which RPC)? |
Hi, Yes I am using gNMIc as a tunnel server. Ok I'll explain you a bit about tunnelclient on the other side. So whenever a connection is made tunnelclient accepts a tag-id from gNMIc and creates a new single session. I want to send multiple tag-id's to tunnelclient in parallel so that multiple GNMI sessions are created at once. |
To create a session you have to trigger an RPC, can you share which RPCs you want to send to the server on the other side of the tunnel? |
Hi, Here gNMIC we are using as a tunnel server. Here concurrent gnmi session can be possible with in the same streaming tunnel. So here the ask is does gNMIC support multiple sessions using the same streaming tunnel. Thanks |
Hi @karimra, Did the above comment answer your query ? |
I understand that, that is basically the spec of grpc tunnel. What I'm asking is which rpc you want to trigger (streaming, unary) and how (are you running gnmic as a cli? as a daemon)? The way to create multiple sessions depends on the type of RPC and how gnmic is ran. |
Ok thanks for the link, I am going thru it. Just to be sure, in this link -> "Combining Tunnel server with a gNMI server" - |
Hi @karimra I am not sure if the link you posted is related to my requirement but I might be wrong. Anyways I have tried to explain the entire architecture and attached ss of issue, please have a look once. Sorry for making it so long :p I am running a streaming RPC (which is subscribe). Please see this for things to be more clear: Now to explain the same thing in a diagram Thanks for all your help, please let me know if anything else need clarification. I will try my best to make things clear. |
It's not possible for 2 processes to listen the same IP/port on the same host, you will have to change either the IP address or the port for one of the gNMIc instances you are starting. In which case, your client should be configured to establish 2 tunnels. The session I'm talking about is the one established by the tunnel server (gNMIc) to the tunnel client aimed at a specific target (ID, Type) i.e the gNMI server behind the tunnel client. In the case of Subscribe RPC, a single session is used to carry all the RPCs per target (ID, Type). If you want to establish multiple sessions, you will need to have more than one target behind the tunnel client. In the case of a Unary RPC, each RPC creates its own session towards the tunnel client to reach the target (ID, Type). |
Ok I agree that in the diagram the direction of session arrow is inverted. But that's not the main point I was trying to discuss. I think if I ask you this question things will get clearer : |
A question related to code of GNMIC : Reading the code I was expecting that you will be creating a session using the function TunnelSession() [ Line 95 in api/tunnel.go ]. |
A target is identified with both its ID and Type, that why I always write (ID,Type). So in the case of a gRPC and netconf sessions, there should be 2 targets registered; (ID, GNMI_GNOI) and (ID, SSH) |
That part of the code is used to craft the messages, you can use that to write your own tunnel server. I don't use it to write gNMIc's tunnel server. I use https://github.com/openconfig/grpctunnel |
Hi,
I am testing this telemetry app with GNMIC and I am able to do the subscribe and capabilities request. I am getting the expected output but here I am only creating one gnmi session.
Is there a way to make multiple sessions within the same connection. Can I add something to the config file of GNMIC to support multiple sessions.
Currently my config file looks like :
**insecure : false
log : true
username : dial
password : Dial@123
tunnel-server:
address: ":50056"
target-wait-time: 20s
skip-verify: false
cert-file: "/root/shivam/self-signed.crt"
key-file: "/root/shivam/self-signed.key"
debug: false**
The text was updated successfully, but these errors were encountered: