From e8504dff71df6042e499a690003a6c3462f39adb Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 5 Oct 2023 19:00:08 -0400 Subject: [PATCH] move http streaming out of preview Signed-off-by: Hannah Hunter --- .../service-invocation-overview.md | 15 +++++++++++ .../support/support-preview-features.md | 26 ------------------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md index edd542ef985..42d6b304d2f 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md @@ -94,6 +94,21 @@ The diagram below shows an example of how this works. If you have 1 instance of Dapr can run on a variety of [hosting platforms]({{< ref hosting >}}). To enable service discovery and service invocation, Dapr uses pluggable [name resolution components]({{< ref supported-name-resolution >}}). For example, the Kubernetes name resolution component uses the Kubernetes DNS service to resolve the location of other applications running in the cluster. Self-hosted machines can use the mDNS name resolution component. The Consul name resolution component can be used in any hosting environment, including Kubernetes or self-hosted. +### Streaming for HTTP service invocation + +You can handle data as a stream in HTTP service invocation. This can offer improvements in performance and memory utilization when using Dapr to invoke another service using HTTP with large request or response bodies. + +The diagram below demonstrates the six steps of data flow. + +Diagram showing the steps of service invocation described in the table below + +1. Request: "App A" to "Dapr sidecar A" +1. Request: "Dapr sidecar A" to "Dapr sidecar B" +1. Request: "Dapr sidecar B" to "App B" +1. Response: "App B" to "Dapr sidecar B" +1. Response: "Dapr sidecar B" to "Dapr sidecar A" +1. Response: "Dapr sidecar A" to "App A" + ## Example Architecture Following the above call sequence, suppose you have the applications as described in the [Hello World tutorial](https://github.com/dapr/quickstarts/blob/master/tutorials/hello-world/README.md), where a python app invokes a node.js app. In such a scenario, the python app would be "Service A" , and a Node.js app would be "Service B". diff --git a/daprdocs/content/en/operations/support/support-preview-features.md b/daprdocs/content/en/operations/support/support-preview-features.md index 4d19ea9a194..e290337382f 100644 --- a/daprdocs/content/en/operations/support/support-preview-features.md +++ b/daprdocs/content/en/operations/support/support-preview-features.md @@ -15,7 +15,6 @@ For CLI there is no explicit opt-in, just the version that this was first made a | Feature | Description | Setting | Documentation | Version introduced | | --- | --- | --- | --- | --- | -| **Streaming for HTTP service invocation** | Enables (partial) support for using streams in HTTP service invocation; see below for more details. | `ServiceInvocationStreaming` | [Details]({{< ref "support-preview-features.md#streaming-for-http-service-invocation" >}}) | v1.10 | | **Pluggable components** | Allows creating self-hosted gRPC-based components written in any language that supports gRPC. The following component APIs are supported: State stores, Pub/sub, Bindings | N/A | [Pluggable components concept]({{}})| v1.9 | | **Multi-App Run for Kubernetes** | Configure multiple Dapr applications from a single configuration file and run from a single command on Kubernetes | `dapr run -k -f` | [Multi-App Run]({{< ref multi-app-dapr-run.md >}}) | v1.10 | | **Workflows** | Author workflows as code to automate and orchestrate tasks within your application, like messaging, state management, and failure handling | N/A | [Workflows concept]({{< ref "components-concept#workflows" >}})| v1.10 | @@ -24,28 +23,3 @@ For CLI there is no explicit opt-in, just the version that this was first made a | **Actor State TTL** | Allow actors to save records to state stores with Time To Live (TTL) set to automatically clean up old data. In its current implementation, actor state with TTL may not be reflected correctly by clients, read [Actor State Transactions]({{< ref actors_api.md >}}) for more information. | `ActorStateTTL` | [Actor State Transactions]({{< ref actors_api.md >}}) | v1.11 | | **Transactional Outbox** | Allows state operations for inserts and updates to be published to a configured pub/sub topic using a single transaction across the state store and the pub/sub | N/A | [Transactional Outbox Feature]({{< ref howto-outbox.md >}}) | v1.12 | -### Streaming for HTTP service invocation - -Running Dapr with the `ServiceInvocationStreaming` feature flag enables partial support for handling data as a stream in HTTP service invocation. This can offer improvements in performance and memory utilization when using Dapr to invoke another service using HTTP with large request or response bodies. - -The table below summarizes the current state of support for streaming in HTTP service invocation in Dapr, including the impact of enabling `ServiceInvocationStreaming`, in the example where "app A" is invoking "app B" using Dapr. There are six steps in the data flow, with various levels of support for handling data as a stream: - -Diagram showing the steps of service invocation described in the table below - -| Step | Handles data as a stream | Dapr 1.11 | Dapr 1.11 with
`ServiceInvocationStreaming` | -|:---:|---|:---:|:---:| -| 1 | Request: "App A" to "Dapr sidecar A | | | -| 2 | Request: "Dapr sidecar A" to "Dapr sidecar B | | | -| 3 | Request: "Dapr sidecar B" to "App B" | | | -| 4 | Response: "App B" to "Dapr sidecar B" | | | -| 5 | Response: "Dapr sidecar B" to "Dapr sidecar A | | | -| 6 | Response: "Dapr sidecar A" to "App A | | | - -Important notes: - -- `ServiceInvocationStreaming` needs to be applied on caller sidecars only. - In the example above, streams are used for HTTP service invocation if `ServiceInvocationStreaming` is applied to the configuration of "app A" and its Dapr sidecar, regardless of whether the feature flag is enabled for "app B" and its sidecar. -- When `ServiceInvocationStreaming` is enabled, you should make sure that all services your app invokes using Dapr ("app B") are updated to Dapr 1.10 or higher, even if `ServiceInvocationStreaming` is not enabled for those sidecars. - Invoking an app using Dapr 1.9 or older is still possible, but those calls may fail unless you have applied a Dapr Resiliency policy with retries enabled. - -> Full support for streaming for HTTP service invocation will be completed in a future Dapr version.