Comments (8)
After digging a bit more on the topic, I've found a discussion hinting the grpc-java client can support circuit breaking via Interceptor
s (the discussion links to a PoC in Kotlin using resilience4J).
Using Interceptor
s is more convenient than my suggestion above because it sets up the circuit breaker per gRCP client automatically (instead of having to wrap every call on the client).
from akka-grpc.
Hey, any updates on this?
Pr is welcome๐๐๐
from akka-grpc.
Some mental notes:
A gRPC client has a Channel
instance connecting the client to a single remote host and that Channel
is shared across several calls.
Lagom's CircuitBreakingServiceLocator
offers a different circuit breaker instance for each call on a remote service. Different approaches could be: (1) per remote service or (2) per remote instance. Maybe akka-grpc could consider supporting all 3 alternatives in the future.
Akka provides general purpose circuit breakers so users can manually setup circuit breaking around their GrpcService
calls if they want to.
Lagom provides a general purpose circuit breaker panel and also promotes ServiceLocator
implementors to extend CircuitBreakingServiceLocator
which keeps circuit breaking a bit hidden but still exposed to users via Settings. CircuitBreakingServiceLocator
looks up a service instance and then runs userland code wrapped on a circuit breaker.
from akka-grpc.
gRPC project has this approved proposal for retries that includes retry throttling. I think it'd be nice if akka-grpc
client could use the configuration and semantics written in the proposal, opening the door for future full support of gPRC standard, including service config discovery via the DNS or other service discovery mechanisms.
from akka-grpc.
I agree this is an area where the Akka gRPC client can be improved! We should definitely look at the linked proposal, but also remember to look for the best ways to translate this into Akka ecosystem concepts (such as akka-discovery and eventually akka-http)
from akka-grpc.
The implementation based on an Interceptor
(in #1118) is not competing with the proposal but an alternative available in simpler deployments (where not DNS or similar config delivery mechanisms exist).
from akka-grpc.
Hmm, maybe another possible approach would be to wrap the method invocations in the generated code?
The generated code fora client has access to, for example, the GrpcClientSettings
.
from akka-grpc.
Hey, any updates on this?
from akka-grpc.
Related Issues (20)
- Release 2.3.2
- Optionally generate Client Stubs HOT 3
- Failed: OutOfMemoryError while compiling HOT 2
- failed: GrpcInteropAkkaJavaWithIoSpec - should pass the server_compressed_unary integration test HOT 1
- `UNAVAILABLE: No grpc-status found` when using `akka-http` backend HOT 8
- Release 2.3.3
- Release 2.3.4
- Stream leak in akka-http backend (grpc client)
- Akka GRPC demo breakdown after implementing Gatling and ScalaPB HOT 1
- Release 2.4.0-M1
- NullPointerException in akka.grpc.internal.GrpcMetadataImpl.asList HOT 2
- failed: NonBalancingIntegrationSpecNetty
- Release 2.4.0-M2
- Unsupported platform: protoc-3.20.1-linux-x86_64.exe HOT 3
- Release 2.4.0 HOT 3
- Skip snapshot publish of the gradle plugin
- Server-side gzip compression is disabled
- akka-grpc start failed with grpc-java 1.60.0 HOT 1
- Release 2.4.1 HOT 1
- failed: AkkaDiscoveryNameResolverSpec
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akka-grpc.