Re: [akka-user] Akka http load balancer

2015-06-01 Thread Akka Team
Ok, I will look into it at some point, but currently there is a huge backlog we need to grind through first. -Endre On Fri, May 29, 2015 at 10:48 AM, Илья Ненахов zergoodso...@gmail.com wrote: I've made new version with cachedPool and one pool for one server

Re: [akka-user] Akka http load balancer

2015-05-29 Thread Илья Ненахов
I've made new version with cachedPool and one pool for one server https://github.com/zergood/akka-http-loadbalancer.git. There is still no effect on perfomance. I'd played a little with http config settings and noticed that sometimes when I set pipelining-limit equals two it doubled performance.

Re: [akka-user] Akka http load balancer

2015-05-28 Thread André
Source (and edit button) are here https://github.com/akka/akka/blob/release-2.3-dev/akka-docs-dev/rst/scala/http/client-side/request-level.rst. ;) On Thursday, May 28, 2015 at 8:09:27 AM UTC+2, zergood wrote: Mistake in docs

Re: [akka-user] Akka http load balancer

2015-05-28 Thread André
A quick search revealed some more places that needed fixing. PR submitted https://github.com/akka/akka/pull/17594. On Thursday, May 28, 2015 at 9:22:35 AM UTC+2, André wrote: Source (and edit button) are here

Re: [akka-user] Akka http load balancer

2015-05-28 Thread zergood
Mistake in docs http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html

Re: [akka-user] Akka http load balancer

2015-05-28 Thread Endre Varga
Can you bundle up a very simple self-contained app that just fires up a couple of server systems locally (can be on the same JVM), and uses the balancing logic above? Then we can look into that and see what is going on. -Endre On Wed, May 27, 2015 at 8:45 PM, Илья Ненахов zergoodso...@gmail.com

Re: [akka-user] Akka http load balancer

2015-05-28 Thread Илья Ненахов
Here it is https://github.com/zergood/akka-http-loadbalancer.git. Actualy this implemetation is not good, because I've relized that with Http().superFlow I miss request-response ordering. Some requests get wrong responses, it is not so important for this implementation, because all responses are

Re: [akka-user] Akka http load balancer

2015-05-28 Thread Endre Varga
But in the code you are using superPool. That gives back the same pool every time, no matter how many times you are using it. Did you try Http.cachedHostConnectionPool(...) explicitly? -Endre On Thu, May 28, 2015 at 4:05 PM, Илья Ненахов zergoodso...@gmail.com wrote: I did different pool for

Re: [akka-user] Akka http load balancer

2015-05-28 Thread Endre Varga
On Thu, May 28, 2015 at 3:08 PM, Илья Ненахов zergoodso...@gmail.com wrote: Here it is https://github.com/zergood/akka-http-loadbalancer.git. Actualy this implemetation is not good, because I've relized that with Http().superFlow I miss request-response ordering. This is why you can attach

[akka-user] Akka http load balancer

2015-05-27 Thread zergood
Hello! I have a task to develop a http balance loader for my 2 servers. Here is my qucik and very dirty implementation https://gist.github.com/zergood/e705cd6ce4cfec47c0a5. The main problem with it is performance, this solution is slower than my single server. What is the reason of

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Endre Varga
Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html). That flattens out the Futures and you get responses instead. That also makes Balance actually aware

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:01 PM, Endre Varga endre.va...@typesafe.com wrote: Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html). That flattens out

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Viktor Klang
On Wed, May 27, 2015 at 2:33 PM, Viktor Klang viktor.kl...@gmail.com wrote: On Wed, May 27, 2015 at 2:01 PM, Endre Varga endre.va...@typesafe.com wrote: Hi, Instead of Http.request, you should use the Flow returned by Http.superPool() (see

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Илья Ненахов
I added Http().superPool() to my implementation, but performance is still low. Performance does not increase after adding third server. It seems strange to me. Adam, yeah we have a reason not to use nginx or something similar, because there will be an additional business logic, not only load

Re: [akka-user] Akka http load balancer

2015-05-27 Thread Adam Shannon
Is there a specific reason to not use another piece of software for this? I'm thinking of something like nginx or haproxy. Both of which are much more hardened and performant in regards to serving as proxies for HTTP traffic. On Wed, May 27, 2015 at 7:34 AM, Viktor Klang viktor.kl...@gmail.com