End-to-End Reactive Streaming RESTful service (a.k.a. Back-Pressure over HTTP)

前端 未结 1 636
谎友^
谎友^ 2021-02-10 08:41

I have been trying to clarify this question online for a while without success, so I will try to ask it here.

I would like to find some resource or example where it sho

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-10 09:03

    You’ve arrived in the right place to ask Akka questions :-)

    There are two talks I’m aware of which show a demo how the backpressure mechanism really works when working with http.

    1) One is Roland Kuhn’s talk on ScalaDays SF 2015: the backpressure over http demo starts around the 44th minute of this talk.

    2) My talk from ScalarConf Warsaw 2015. the streams part begins around the 18 minute, and the backpressuring demo is seen around the 24th minute. It shows a “fast processing” and “slow processing” server, in which you can see the curl client being backpressured when the file is being uploaded (I use a file as an example because it’s a nice “big request”).

    The back pressure is propagated to the client thanks to TCPs built in mechanisms for this - on the server side we simply do not read from the socket until demand is available, which causes the back pressure to be propagated properly.

    I hope this helps!

    0 讨论(0)
提交回复
热议问题