akka-grpc icon indicating copy to clipboard operation
akka-grpc copied to clipboard

feat: Periodic client discovery refresh #1152

Open johanandren opened this issue 1 year ago • 3 comments

New per-service client config with an interval to trigger (possibly) cache-piercing refresh of discovered endpoints for a service.

Depends on upstream API addition in Akka.

References #1152

johanandren avatar Dec 15 '23 12:12 johanandren

It is a bit hard to provide a regular programmatic hook since the AkkaDiscoveryNameResolver instance is created deep behind the scenes depending on backend and discovery used. I guess one way would be to have it listen to a stream or topic or something like that.

Note that the refresh is in the client config so can be set separately for each specific endpoint via service name in config (or with code in the used GrpcClientSettings).

johanandren avatar Dec 20 '23 07:12 johanandren

@Marcus-Rosti @danieltahara how important is the ability to do a manual call if periodic refresh is in place with this PR?

johanandren avatar Dec 20 '23 08:12 johanandren

@Marcus-Rosti @danieltahara how important is the ability to do a manual call if periodic refresh is in place with this PR?

I think for our use case, manual isn't necessary, although I agree the ideal would be to have a trigger so it could just be directly synced to k8s events.

danieltahara avatar Jan 08 '24 18:01 danieltahara