You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/07/11 15:47:04 UTC

[jira] [Resolved] (CAMEL-5628) Sticky load balancer to support initial call problem for example with http session ids

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

Claus Ibsen resolved CAMEL-5628.
--------------------------------
    Resolution: Won't Fix

> Sticky load balancer to support initial call problem for example with http session ids
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5628
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5628
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, eip
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> If you use the sticky load balancer over http endpoints, and want to use the http session id as correlation expression, then you may have a problem on the initial call (eg no http session yet). Then the correlation expression would yield empty/null. 
> We should add an option to the sticky load balancer, in that case, when the correlation expression is empty/null, to pick a random (or we can do round robin) endpoint, and then *after* the call, then execute the correlation expression again, to grab the value (eg such as a http session). Then it should use this matching for the future so on the next call it will pick the same http endpoint again.
> The trick though is that the algorithm is no longer a simple hashing. But would need to be per client. And as we don't want to keep this matching list forever in Camel, we would need to use a LRUCache so the matching can expire if not in use. And for that we should offer an option to set the idle timeout value. So you can match that with eg the http session timeout. For example 30 minutes etc.
> This would make it much easier to use Camel as http load balancer with the http session id from the remote http endpoints. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)