Archived

This forum has been archived. Please start a new discussion on GitHub.

Load-Balancing at connection time only

Hi,

In the current version of ICE, load-balancing is operated at connection time. Are there any plans to make this mechanism available at a request level? Or at least for stateless methods. For example, we could imaging having a keyword in the slice definition file that would indicate that a method is stateless and can therefore be load-balanced for every client call.

Regards,
Cyrille

Comments

  • benoit
    benoit Rennes, France
    Hi Cyrille,

    You can already achieve per-request load balancing by modifying the proxy configuration programmatically and disabling the caching of the connection with the proxy. When proxy connection caching is disabled, each invocation on the proxy will obtain a random connection matching one of the endpoints of the proxy.

    For more information, I recommend reading the connection establishment chapter in the Ice manual.

    Cheers,
    Benoit.
  • Load-Balancing at connection time only

    Hello Benoit and many thanks for your answer.

    Still I have a question regarding performances. Since the connection will be recreated for every call, I suppose there is going to be an overhead in the processing time of each request. I beleive that the Ice layer does not keep a connection pool on the client side. Correct?

    If these assumptions are correct, would removing the cache would be something that you would recommend? Or is this only a woraround to allow load-balancing at request level?

    Regards,
    Cyrille
  • benoit
    benoit Rennes, France
    The Ice runtime does not establish a new connection for each request. There is a pool of connections on the client side so the cost of not caching connections is minimal and mostly involves some additional lookups to find a connection matching the endpoints of the proxy on each call. The overhead should be insignificant for most applications so yes I do recommend disabling the cache to achieve per-request load balancing.

    Cheers,
    Benoit.
  • Load-Balancing at connection time only

    Benoit,

    Thank you for your answers.

    Cyrille