Here is a gist of a small file server that uses chunked encoding. You should be able to see the backpressure work with this.
https://gist.github.com/rklaehn/3f26c3f80e5870831f52#file-file-server-example If you run it, it opens a server on localhost, port 8080, that serves all files on your system. So just put some large text file somewhere in your home directory, start the server, and get it with curl like this: curl --limit-rate 1k http://127.0.0.1:8080/Users/rklaehn/tmp/somelargetext.txt You can see on the server side that new chunks are produced at the rate that curl consumes them => backpressure. Warning: I wrote this before I was really familiar with akka-streams. So the code might be not exactly idiomatic. Hth, Rüdiger On Fri, Feb 13, 2015 at 10:22 AM, dan costelloe <[email protected]> wrote: > > Hi Rüdiger, > > On Tuesday, 28 October 2014 09:22:07 UTC, rklaehn wrote: >> >> Hi all, >> >> I am doing some testing with akka-http and chunked encoding. I want to >> investigate the backpressure behavior, so I am using curl with >> --limit-rate 1k on the client side. I should I see backpressure when >> using akka-http to send a HttpEntity.Chunked, right? > > > For the purposes of educating a newbie, would you be so kind as to share > your code and curl settings for this test? > > Much obliged! > dan > > -- >>>>>>>>>>> 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 [email protected]. > To post to this group, send email to [email protected]. > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
