[ 
https://issues.apache.org/jira/browse/CASSANALYTICS-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bianca Stanciu updated CASSANALYTICS-177:
-----------------------------------------
    Status: Awaiting Feedback  (was: Triage Needed)

Waiting for review on [https://github.com/apache/cassandra-analytics/pull/222]

> Add instanceId query parameter to fix HTTP 421 errors when Sidecar is behind 
> 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: High
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> +_*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 header 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]

Reply via email to