[
https://issues.apache.org/jira/browse/CASSANALYTICS-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bianca Stanciu moved CASSSIDECAR-481 to CASSANALYTICS-177:
----------------------------------------------------------
Component/s: Writer
(was: Bulk Analytics)
Key: CASSANALYTICS-177 (was: CASSSIDECAR-481)
Project: Apache Cassandra Analytics (was: Sidecar for Apache Cassandra)
> Add instanceId query parameter to fix HTTP 421 errors when Sidecar is behing
> an AWS Load Balancer
> -------------------------------------------------------------------------------------------------
>
> Key: CASSANALYTICS-177
> URL: https://issues.apache.org/jira/browse/CASSANALYTICS-177
> Project: Apache Cassandra Analytics
> Issue Type: Improvement
> Components: Writer
> Reporter: Bianca Stanciu
> Assignee: Bianca Stanciu
> Priority: Normal
>
> +_*Problem:*_+
> When Sidecar sits behind an AWS NLB, every HTTP request from the analytics
> client returns *421 Misdirected Request.*
> The NLB forwards TCP without modifying HTTP headers, so the Host header
> arriving at Sidecar contains the NLB's IP, not the Sidecar's own address.
> Sidecar uses Host to identify which Cassandra instance the request is for.
> _*Solution:*_
> Add an optional instanceId query parameter appended to every outbound Sidecar
> request:
> {code:java}
> POST /api/v1/restore-job/slices?instanceId=1
> GET /api/v1/cassandra/timeSkew?instanceId=1{code}
> Sidecar already checks +_*?instanceId*_+ before the Host header, bypassing
> the NLB IP lookup entirely. No Sidecar-side changes needed.
> Enabled with one Spark conf flag:
> {code:java}
> --conf "spark.cassandra_analytics.sidecar.instance.id=1" {code}
> Default is null, no parameter added, zero behavior change for the existing
> flow.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]