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
 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. But there
 was no strong correlation between piplining-limit and performance gain.

 2015-05-28 17:11 GMT+03:00 Endre Varga endre.va...@typesafe.com:

 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 every server but there was no effect on
 performance.

 2015-05-28 16:54 GMT+03:00 Endre Varga endre.va...@typesafe.com:



 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 context to the requests and that will be
 returned with the response.


 Some requests get wrong responses, it is not so important for this
 implementation, because all responses are the same.
 How can I repair request-response ordering? I think about mapping
 request to some id, and store all unhandled requests before I get
 (response, id) from server, another variant is passing RequestContext to
 superFlow. Are there another ways how to do this?

 P.S in this implementation balancer performance ~900r/s. Single local
 http server performance is ~4800r/s.


 I just realized that because you are using the common pool
 (Http.request is using the same one, too), balancing will have no real
 effect since all the requests are routed to the same pool anyway. What you
 need is host level connection pools on each balance edge, pinned to the
 server you target on that graph edge.

 -Endre




 2015-05-28 13:09 GMT+03:00 Endre Varga endre.va...@typesafe.com:

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

 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
 balancing. But if we can't fix the performance issue, nginx and etc 
 would
 be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to
 the task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
  wrote:

 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 performance degradation? Could you give
 me any advices how to make http load balancer with akka-http? I am 
 using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the
 Google Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from
 it, send an 

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. But there
was no strong correlation between piplining-limit and performance gain.

2015-05-28 17:11 GMT+03:00 Endre Varga endre.va...@typesafe.com:

 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 every server but there was no effect on
 performance.

 2015-05-28 16:54 GMT+03:00 Endre Varga endre.va...@typesafe.com:



 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 context to the requests and that will be
 returned with the response.


 Some requests get wrong responses, it is not so important for this
 implementation, because all responses are the same.
 How can I repair request-response ordering? I think about mapping
 request to some id, and store all unhandled requests before I get
 (response, id) from server, another variant is passing RequestContext to
 superFlow. Are there another ways how to do this?

 P.S in this implementation balancer performance ~900r/s. Single local
 http server performance is ~4800r/s.


 I just realized that because you are using the common pool (Http.request
 is using the same one, too), balancing will have no real effect since all
 the requests are routed to the same pool anyway. What you need is host
 level connection pools on each balance edge, pinned to the server you
 target on that graph edge.

 -Endre




 2015-05-28 13:09 GMT+03:00 Endre Varga endre.va...@typesafe.com:

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

 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
 balancing. But if we can't fix the performance issue, nginx and etc would
 be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to
 the task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me
 any advices how to make http load balancer with akka-http? I am 
 using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the
 Google Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from
 it, send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit 

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 
 http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html
  
 http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA.
  Http.superPool(...) 
 need to be Http().superPool(...) and the same for Http.singleRequest.
  
 среда, 27 мая 2015 г., 15:01:34 UTC+3 пользователь drewhk написал:

 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
  
 http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA).
  
 That flattens out the Futures and you get responses instead. That also 
 makes Balance actually aware of response times.

 OTOH I don't think performance wise akka-http is currently up to the task 
 of being a balancer. 

 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoo...@gmail.com wrote:

 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 performance degradation? Could you give me any 
 advices how to make http load balancer with akka-http? I am using 
 scala-2.11 and akka-http 1.0-RC3.  

 -- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: 
 https://groups.google.com/group/akka-user
 --- 
 You received this message because you are subscribed to the Google 
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to akka-user+...@googlegroups.com.
 To post to this group, send email to akka...@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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 
 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 
 http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/client-side/request-level.html
  
 http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA.
  Http.superPool(...) 
 need to be Http().superPool(...) and the same for Http.singleRequest.
  
 среда, 27 мая 2015 г., 15:01:34 UTC+3 пользователь drewhk написал:

 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
  
 http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA).
  
 That flattens out the Futures and you get responses instead. That also 
 makes Balance actually aware of response times.

 OTOH I don't think performance wise akka-http is currently up to the 
 task of being a balancer. 

 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoo...@gmail.com wrote:

 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 performance degradation? Could you give me any 
 advices how to make http load balancer with akka-http? I am using 
 scala-2.11 and akka-http 1.0-RC3.  

 -- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: 
 https://groups.google.com/group/akka-user
 --- 
 You received this message because you are subscribed to the Google 
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to akka-user+...@googlegroups.com.
 To post to this group, send email to akka...@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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
 
http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA.
 Http.superPool(...) 
need to be Http().superPool(...) and the same for Http.singleRequest.
 
среда, 27 мая 2015 г., 15:01:34 UTC+3 пользователь drewhk написал:

 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
  
 http://www.google.com/url?q=http%3A%2F%2Fdoc.akka.io%2Fdocs%2Fakka-stream-and-http-experimental%2F1.0-RC3%2Fscala%2Fhttp%2Fclient-side%2Frequest-level.htmlsa=Dsntz=1usg=AFQjCNFk7u2ednXynJOI5ubpUSi7sKawQA).
  
 That flattens out the Futures and you get responses instead. That also 
 makes Balance actually aware of response times.

 OTOH I don't think performance wise akka-http is currently up to the task 
 of being a balancer. 

 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoo...@gmail.com 
 javascript: wrote:

 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 performance degradation? Could you give me any 
 advices how to make http load balancer with akka-http? I am using 
 scala-2.11 and akka-http 1.0-RC3.  

 -- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 --- 
 You received this message because you are subscribed to the Google Groups 
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to akka-user+...@googlegroups.com javascript:.
 To post to this group, send email to akka...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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

 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 balancing. But if
 we can't fix the performance issue, nginx and etc would be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the
 task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




 --
 Cheers,
 √

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Adam Shannon | Software Engineer | Banno | Jack Henry
 206 6th Ave Suite 1020 | Des Moines, IA 50309 | Cell: 515.867.8337

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Akka User List group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/akka-user/_wd1vl0mzfE/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  

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 the same.
How can I repair request-response ordering? I think about mapping request
to some id, and store all unhandled requests before I get (response, id)
from server, another variant is passing RequestContext to superFlow. Are
there another ways how to do this?

P.S in this implementation balancer performance ~900r/s. Single local http
server performance is ~4800r/s.

2015-05-28 13:09 GMT+03:00 Endre Varga endre.va...@typesafe.com:

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

 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
 balancing. But if we can't fix the performance issue, nginx and etc would
 be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the
 task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




 --
 Cheers,
 √

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Adam Shannon | Software Engineer | Banno | Jack Henry
 206 6th Ave Suite 1020 | Des Moines, IA 50309 | Cell: 515.867.8337

 --
  

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 every server but there was no effect on
 performance.

 2015-05-28 16:54 GMT+03:00 Endre Varga endre.va...@typesafe.com:



 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 context to the requests and that will be
 returned with the response.


 Some requests get wrong responses, it is not so important for this
 implementation, because all responses are the same.
 How can I repair request-response ordering? I think about mapping
 request to some id, and store all unhandled requests before I get
 (response, id) from server, another variant is passing RequestContext to
 superFlow. Are there another ways how to do this?

 P.S in this implementation balancer performance ~900r/s. Single local
 http server performance is ~4800r/s.


 I just realized that because you are using the common pool (Http.request
 is using the same one, too), balancing will have no real effect since all
 the requests are routed to the same pool anyway. What you need is host
 level connection pools on each balance edge, pinned to the server you
 target on that graph edge.

 -Endre




 2015-05-28 13:09 GMT+03:00 Endre Varga endre.va...@typesafe.com:

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

 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
 balancing. But if we can't fix the performance issue, nginx and etc would
 be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to
 the task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me
 any advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the
 Google Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this 

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 context to the requests and that will be
returned with the response.


 Some requests get wrong responses, it is not so important for this
 implementation, because all responses are the same.
 How can I repair request-response ordering? I think about mapping request
 to some id, and store all unhandled requests before I get (response, id)
 from server, another variant is passing RequestContext to superFlow. Are
 there another ways how to do this?

 P.S in this implementation balancer performance ~900r/s. Single local http
 server performance is ~4800r/s.


I just realized that because you are using the common pool (Http.request is
using the same one, too), balancing will have no real effect since all the
requests are routed to the same pool anyway. What you need is host level
connection pools on each balance edge, pinned to the server you target on
that graph edge.

-Endre




 2015-05-28 13:09 GMT+03:00 Endre Varga endre.va...@typesafe.com:

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

 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
 balancing. But if we can't fix the performance issue, nginx and etc would
 be a plan b.

 2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the
 task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me
 any advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




 --
 Cheers,
 √

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because 

[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 performance degradation? Could you give me any 
advices how to make http load balancer with akka-http? I am using 
scala-2.11 and akka-http 1.0-RC3.  

-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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 of response times.

OTOH I don't think performance wise akka-http is currently up to the task
of being a balancer.

-Endre

On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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 the Futures and you get responses instead. That also
 makes Balance actually aware of response times.

 OTOH I don't think performance wise akka-http is currently up to the task
 of being a balancer.


…at the moment.



 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
Cheers,
√

-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the task
 of being a balancer.


 …at the moment.


Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




-- 
Cheers,
√

-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


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 balancing. But if
we can't fix the performance issue, nginx and etc would be a plan b.

2015-05-27 17:14 GMT+03:00 Adam Shannon adam.shan...@banno.com:

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the
 task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com
 wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




 --
 Cheers,
 √

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Adam Shannon | Software Engineer | Banno | Jack Henry
 206 6th Ave Suite 1020 | Des Moines, IA 50309 | Cell: 515.867.8337

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Akka User List group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/akka-user/_wd1vl0mzfE/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from 

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



 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
 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 of response times.

 OTOH I don't think performance wise akka-http is currently up to the
 task of being a balancer.


 …at the moment.


 Doh, that currently eluded me, see my response as emphasis :)





 -Endre

 On Wed, May 27, 2015 at 1:21 PM, zergood zergoodso...@gmail.com wrote:

 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 performance degradation? Could you give me any
 advices how to make http load balancer with akka-http? I am using
 scala-2.11 and akka-http 1.0-RC3.

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.


  --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives:
 https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




 --
 Cheers,
 √

 --
  Read the docs: http://akka.io/docs/
  Check the FAQ:
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
 ---
 You received this message because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
Adam Shannon | Software Engineer | Banno | Jack Henry
206 6th Ave Suite 1020 | Des Moines, IA 50309 | Cell: 515.867.8337

-- 
  Read the docs: http://akka.io/docs/
  Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.