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

ASF subversion and git services commented on KNOX-3041:
-------------------------------------------------------

Commit 2beb45b33c09d5957fc47dd8a1e7a9e951391967 in knox's branch 
refs/heads/master from hanicz
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=2beb45b33 ]

KNOX-3041: Eliminate load-balancing race condition in HA dispatch (#1317)

> Load Balancer backend selection synchronization issue
> -----------------------------------------------------
>
>                 Key: KNOX-3041
>                 URL: https://issues.apache.org/jira/browse/KNOX-3041
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>            Reporter: Istvan Toth
>            Assignee: Tamás Hanicz
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I was trying to run a benchmark over Knox, with several Http client instances 
> started at the same time on separate threads.
> I found that every single client was directed to the same backend, which was 
> saved in the session, so instead of accessing each backend, every request was 
> directed to a single one.
> While this was a benchmark/load test tool, any non-interactive client can 
> exhibit similar behaviour, defating the point of load balancing.
> Looking at 
> org.apache.knox.gateway.ha.dispatch.ConfigurableHADispatch.executeRequestWrapper(HttpUriRequest,
>  HttpServletRequest, HttpServletResponse) 
> , I think that the sitation could be improved by calling 
> haProvider.makeNextActiveURLAvailable BEFORE the request is executed.
> It would be still racy, but the race window would be dramatically smaller, 
> running some simple local code, which should be on the microsecond scale, 
> instead of performing a full HTTP reqest, which is on on the millisecond 
> scale at best.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to