Comments (3)
@Ashishpote A couple of initial thoughts:
- The
HttpClient
used byDaprClient
, both for HTTP and gRPC, can be customized and has aTimeout
property. - The
HttpClient
docs also suggests per-invocation timeouts be implemented usingCancellationTokenSource
, which can be done withDaprClient
methods as well. - Dapr offers "resiliency" as a building block of its own, which comprehends timeouts and could be used for similar purposes, and/or as part of a larger resiliency policy.
If you don't believe any of these options would work, I'd love to know more about your specific scenarios.
from dotnet-sdk.
Looking more closely, it looks like some of the HttpClient
customization mechanisms are meant for testing and not necessarily exposed in the public API, so there may still be more we could do here (see similar issue #756). From the same question on Discord, it seems the scenario isn't applying a specific timeout, but extending the existing (default) HttpClient
timeout (which is documented as 100s). (The Dapr runtime method invocation does not have a timeout, unless explicitly configured via resiliency policy.)
There was a suggestion on Discord to use DaprClient.CreateInvokeHttpClient()
which returns a HttpClient
instance that can then have its Timeout
property set. That's admittedly an entirely different way to do method invocation, but should work in the (hopefully) limited case of a specific method requiring more time.
from dotnet-sdk.
Agreed. We have indeed been using Resiliency
now to have central control over Timeout
for both service invocation and pub/sub. However, I would still prefer if we can pass more options by exposing HttpClient
directly or indirectly so that we can have control per service.
from dotnet-sdk.
Related Issues (20)
- Dapr Actor startup in AspNetCore - Issue in .NET 8
- macOS Sonoma 14.4 - SocketException: Can't assign requested address HOT 2
- [Proposal] Deprecate .NET 6/7 support in favor of .NET 8 in fall release HOT 3
- Token returned by QueryStateAsync() does not work for subsequent queries HOT 2
- Actor proxy reuses HTTP request when performing a retry to call an actor HOT 1
- SaveBulkStateAsync() throws context deadline exceeded exception HOT 3
- How to use ExecuteStateTransactionAsync() HOT 3
- It is not possible to read headers sent from a RabbitMQ message HOT 3
- Unable to use EventHub or Service Bus Dapr Component HOT 1
- Update the holopin.yml to use the sdk badge HOT 2
- Unable to stream using HTTP service invocation HOT 1
- Add option to handle 'dead letters' by sending them to a dead letter queue rather than a dead leter topic HOT 2
- intermittent exceptions from WorkflowLoggingService
- AddDaprSecretStore() fails on Kubernetes HOT 1
- Regarding custom middleware to setup in the pipeline and how to create
- Regarding custom middleware to setup in the pipeline and how to create
- PublishEventAsync Blocking When Delivering Locally? HOT 7
- Cryptography Support Enhancements
- SaveBulkStateAsync does not respect DAPR_API_TOKEN
- Standardize README with shield badges HOT 8
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 dotnet-sdk.