Whether resources get tied up on the server memory would depend on the 
actual service implementation, but the gRPC server framework itself will 
not cause resources to be tied up for a stopped stream, since the gRPC 
server would only need to process the next frame if any that arrives. The 
overhead on the server in such a case would be the resources used for the 
TCP connection that is still alive. To handle this more efficiently you 
should use one of the many different types of timeout settings 
<https://grpc.io/docs/guides/keepalive/> that are available to control how 
long to keep an idle connection alive.

On Sunday, July 21, 2024 at 9:36:23 AM UTC+5:30 孔雪 wrote:

>  Hey everyone,
> I'm building an API with GRPC which currently looks like this:
> ```
> service MyService {
>   rpc sendMessageStream(stream MyRequest) returns(MyResult){};
> }
> ```
> If the client invokes the GRPC API but never invokes the onCompleted 
> method, will it occupy server-side memory resources?  
>
> The server is implemented in Java, and the client may be python, Java or 
> C++.
>
> The dependency versions introduced by the server are as follows:
>
> <dependency>
>     <groupId>net.devh</groupId>
>     <artifactId>grpc-spring-boot-starter</artifactId>
>     <version>2.13.1.RELEASE</version>
> </dependency>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/aeae0df5-6e28-481d-b92b-f299d2c2c5fcn%40googlegroups.com.

Reply via email to