Skip to content

Commit

Permalink
Add details on logging behavior and mutating requests
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <akurait@amazon.com>
  • Loading branch information
AndreKurait committed Apr 23, 2024
1 parent 903d927 commit 987125c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TrafficCapture/trafficCaptureProxyServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ Follow documentation for [deploying solution](../../deployment/README.md) to set

## Failure Modes

Definitions:
* Mutating - HTTP Requests with method POST, PUT, DELETE, or PATCH with differentiating behavior defined in [ProxyChannelInitializer::shouldGuaranteeMessageOffloading](https://github.com/opensearch-project/opensearch-migrations/blob/15c62718032e02a089e158cdf61c753542c20175/TrafficCapture/trafficCaptureProxyServer/src/main/java/org/opensearch/migrations/trafficcapture/proxyserver/netty/ProxyChannelInitializer.java#L37)

| Component | Type of Request | Scenario | First Behavior | First Duration | Eventual Behavior |
|-----------------|-----------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Kafka** | Mutating | Kafka Error | Data will be buffered and retried by the Kafka client based on the configured timeouts and the Kafka server's response. The delivery.timeout.ms setting of 10 seconds is the upper limit for how long the client will attempt to send data, including retries, before considering the operation failed. This is in the critical line for request proxying so the client will not receive a response. | 10 Seconds | When the completable future for offloading fails, a log statement will be outputted and the request will be forwarded to the destination service. No retry of this message's offloading will occur |
| **Kafka** | Mutating | Kafka Unavailable | Same behavior as <Kafka Error> | 10 Seconds | Same behavior as <Kafka Error> |
| **Kafka** | Non-Mutating | Kafka Error | Data will be buffered and retried by the Kafka client based on the configured timeouts and the Kafka server's response. The delivery.timeout.ms setting of 10 seconds is the upper limit for how long the client will attempt to send data, including retries, before considering the operation failed. This is not in the critical line for request proxying so request will be immediately proxied. | N/A | N/A |
| **Kafka** | Non-Mutating | Kafka Unavailable | Same behavior as <Kafka Error> | N/A | N/A |
| **Destination** | Any | Offline | Proxy will directly pass through to the client the same behavior/response as seen by the destination. The proxy maintains 1:1 connection ratio between upstream clients and the destination. | N/A | N/A |
| **Logging** | Any | Any | Capture Proxy logs to Standard Output/Error streams. This can be configured via Log4j properties. For specific AWS Behavior, see configuration for the [AWS Log Driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) | N/A | N/A |
| **Logging** | Any | Any | Capture Proxy logs to Standard Output/Error streams. This can be configured via Log4j2 properties which default to non-blocking behavior as specified in [PR#602](https://github.com/opensearch-project/opensearch-migrations/pull/602). For specific AWS Behavior, see configuration for the [AWS Log Driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) | N/A | N/A |
| **Otel** | Any | Any | By default there is no retry of the OTLP Exporter. This can be enabled by setting the appropriate JVM parameter or environment variable as specified in the [Java OTLP Documentation](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure#otlp-exporter-span-metric-and-log-exporters) | N/A | N/A |

0 comments on commit 987125c

Please sign in to comment.