From 987125c35107a26bb6eb01bb816d259b7970f5c7 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Tue, 23 Apr 2024 13:32:41 -0500 Subject: [PATCH] Add details on logging behavior and mutating requests Signed-off-by: Andre Kurait --- TrafficCapture/trafficCaptureProxyServer/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TrafficCapture/trafficCaptureProxyServer/README.md b/TrafficCapture/trafficCaptureProxyServer/README.md index 06a4e303e..2a71747bc 100644 --- a/TrafficCapture/trafficCaptureProxyServer/README.md +++ b/TrafficCapture/trafficCaptureProxyServer/README.md @@ -57,6 +57,9 @@ 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 | @@ -64,5 +67,5 @@ Follow documentation for [deploying solution](../../deployment/README.md) to set | **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 | 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 | \ No newline at end of file