Bianca Stanciu created CASSSIDECAR-481:
------------------------------------------
Summary: Add instanceId query parameter to fix HTTP 421 errors
when Sidecar is behing an AWS Load Balancer
Key: CASSSIDECAR-481
URL: https://issues.apache.org/jira/browse/CASSSIDECAR-481
Project: Sidecar for Apache Cassandra
Issue Type: Improvement
Components: Bulk Analytics
Reporter: Bianca Stanciu
Assignee: Bianca Stanciu
+_*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]