grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.46k stars 811 forks source link

After the service restarts, requests do not come through. #1124

Open tiandaye opened 1 month ago

tiandaye commented 1 month ago

The question

There are two services, server-a and server-b, each with two instances. server-a will call the server-b service, and after one instance of server-b restarts, all traffic will go to the other instance of server-b.

The application's environment

Additional information

Shutting down the service will print the following information, restarting will not print it

image

Adding the following configuration will work,I think it was because the service list was not refreshed when the GRPC service was restarted.

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true

image