Questions tagged [grpc-node]

grpc-node is a high-performance, open-source universal RPC framework for Node.js platform.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

grpc-node repository

gRPC Node Quick Start

222 questions
1
vote
1 answer

Session state in gRPC

Does gRPC have the notion of session state? Can I keep state associated with a session, such as to allow a client to incrementally build a data structure, and garbage collect it when the session ends?
er0
  • 1,746
  • 2
  • 16
  • 31
1
vote
2 answers

Node gRPC: sending metadata from server to client without error

From the client side, it is easy to add metadata for the server: const meta = new grpc.Metadata(); meta.add('xyz', 'okay'); stub.service.Rpc(request, meta, (err, response) => { }); The above can be accessed on the server like…
treecoder
  • 43,129
  • 22
  • 67
  • 91
0
votes
0 answers

How to solve the error: "Error: Cannot find module" when building NestJs?

I have a NestJs application in which I want to use the GRPC. To generate my typescript files from my `.proto` file I used the npm module "grpc_tools_node_protoc_ts" who generated me 2 files, "stable_pb.d.ts" and "stable_pb.d.ts". These 2 files as…
0
votes
1 answer

ClientWritableStream implementation in grpc-js node library is different from whats mentioned in grpc/node API reference

grpc-js reference Where write method has encoding as second argument _write(chunk: RequestType, encoding: string, cb: WriteCallback) { const context: MessageContext = { callback: cb, }; const flags = Number(encoding); if…
Rahul solanki
  • 83
  • 1
  • 4
0
votes
1 answer

Should we use bidirectional streaming vs unidirectional grpc requests in a chat app

I have a simple chat app with an api-gateway responsible for socket.io and chat-microservice responsible for storing chats and messages. //api-gateway/chat.gateway.ts //receive web-socket messages here @SubscribeMessage('sendMessage') async…
0
votes
1 answer

Will 2 unidirectional identical gRPC calls open 2 HTTP/2 connections or will they reuse a single connection?

In my chat app (Nest.js + gRPC microservices) I need to send requests (to create messages) as fast as possible and I worry that reopening the connection (if it is the case) can take too much time and resources. I tried searching the docs but didn't…
0
votes
1 answer

does @grpc/grpc-js reuse the http2 connection or does it create new connection for each call/request

I have a nestjs + grpc-js service and a client. And this rpc is called very frequently. The question is: does it reuse the connection or starts a new one every time rpc is called? Or should I use streaming to avoid reconnect and save memory/reduce…
0
votes
0 answers

I am getting Error: 13 INTERNAL: No message received when replacing grpc with @grpc/grpc-js

When i am trying to switch to new grpc package (@grpc/grpc-js)from existing package(grpc) in my existing code i am getting the error code const grpc = require("@grpc/grpc-js"); const protoLoader = require("@grpc/proto-loader"); const confiq =…
Vaibhav Verma
  • 127
  • 1
  • 11
0
votes
1 answer

nodejs grpc-tools generate js code protobuf package import path is error

this is my project: /nodejs /out /protos project.proto package.json project.proto syntax = "proto3"; package com.test; import "google/protobuf/timestamp.proto"; import "google/protobuf/descriptor.proto"; import…
consoles
  • 3
  • 2
0
votes
0 answers

How to make CloudRun grpc node.js service accessible from internet i.e accept request and returns response?

I have a Node.js gRPC service deployed on CloudRun, with the following configurations: Continuous integration from Github with Dockerfile with which it creates docker container. I have exposed port 8080 in the container, it's the same port…
0
votes
2 answers

gRPC Health Checks on AWS ALB

No matter which health check path I provide, even if it's completely arbitrary text, the health check will only pass as long if the matcher code is set to 0. I have one service that's just using the default path given by the AWS example -…
0
votes
1 answer

How to add request timeout in GRPC Server in Nestjs

We have created a GRPC server microservice in nestjs which fetches data from the Database and share the result with the client. but need to add some timeout in the GRPC server so if the request is not completed within that time the need to throw an…
Suraj Dalvi
  • 988
  • 1
  • 20
  • 34
0
votes
0 answers

Node GRPC TLS with Reverse proxy (haproxy)

I'm trying to use a haproxy instance to correctly redirect the requests from the client to the server. But the client can't connect using the haproxy, it only works when I do the request directly to the server. The unique message error is printed…
0
votes
0 answers

empty git submodules inside a container running on AKS

I have all my grpc protobuf file in a single repository and every other service uses git submodules to have access to the necessary protobuf file. each services have CI github actions that build the image and pushes to docker hub on every pull…
0
votes
1 answer

Server side gRPC service not getting recognised on client Side

I have been learning about gRPC, and I was trying to implement a gRPC API to create, get and list to-dos. Here is the server side code of the API: https://github.com/girikgarg8/NodeJS/tree/master/GRPC_Node And here is the client side code of the…
Girik Garg
  • 87
  • 7