[ 
https://issues.apache.org/jira/browse/CASSANALYTICS-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110597#comment-18110597
 ] 

Bianca Stanciu commented on CASSANALYTICS-181:
----------------------------------------------

[https://github.com/apache/cassandra-analytics/pull/223]  is ready for another 
look.
Time-skew used to fan out to the per-replica FQDNs from the token map, which 
executors can’t reach when Sidecar is behind a load balancer. Now it just calls 
timeSkew() against the contact points instead. That’s fine because the 
time-skew endpoint doesn’t care
which instance answers (TimeSkewHandler doesn’t look at the Host header), so 
any Sidecar behind the LB can respond.
Like you suggested, I made it generic instead of coordinated-only: renamed it 
to {*}LoadBalancedCassandraClusterInfo{*}, moved it out of the coordinated 
package, and the flag now works for both single-cluster and coordinated writes 
(picked in CassandraClusterInfo.create).
Default behavior is unchanged and there are tests for it.
cc [~skoppu] 

> Support Sidecar behind a load balancer for time-skew validation in 
> coordinated writes
> -------------------------------------------------------------------------------------
>
>                 Key: CASSANALYTICS-181
>                 URL: https://issues.apache.org/jira/browse/CASSANALYTICS-181
>             Project: Apache Cassandra Analytics
>          Issue Type: Improvement
>          Components: Writer
>            Reporter: Bianca Stanciu
>            Assignee: Bianca Stanciu
>            Priority: High
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
>   ## Problem                                                                  
>                                           
>                   
>   Time-skew validation before a coordinated bulk write fans out HTTP calls 
> directly to per-replica FQDNs resolved from the Cassandra token map. In 
> deployments where Sidecar is fronted by a *load balancer,* those FQDNs are 
> *not* routable from Spark executors, only the load balancer address is. This 
> causes  time-skew validation to fail at the start of every coordinated write 
> job,  blocking bulk writes entirely in load-balanced Sidecar deployments.     
>                                                             
>   ## Solution                                                                 
>                                           
>                   
>   Add a _*SIDECAR_BEHIND_LOAD_BALANCER*_ writer option (default: false). When 
> true, time-skew validation skips the per-replica fan-out and routes through 
> the preconfigured load balancer contact points instead:                       
>                                                                       
> {code:java}
>     sidecarClient.timeSkew()  // routes through LB, no per-replica list{code}
>                                                                               
>                                           
>   Implemented via a *new CoordinatedCassandraClusterInfo* subclass that 
> overrides only the time-skew fetch step, leaving all other behavior unchanged.
>                                                                               
>                                           
>   ## Acceptance Criteria
>                                                                               
>                                           
>   - [ ] Flag has no effect on single-cluster writes (warning logged if 
> misconfigured)                
>   - [ ] Default behavior (flag=false) is unchanged
>   - [ ] Unit test verifies timeSkew(List) is never called when flag is 
> enabled                               
>   - [ ] CHANGES.txt entry added under 0.5.0   



--
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