I'm using akka-http to build one of my services which returns a chunked response that could be 10s of MBs big depending on the client's query. I've noticed that the memory required is proportional to the number of concurrent streams rather than the number of connections from clients, as idle connections seem to use hardly any resources at all.
Is there any way to limit the number of responses being rendered? I can only see the akka.http.server.max-connections config variable which seems to limit the total number of connections, rather than in flight responses. With a low max-connections value clients could be denied service because of idle clients holding connections. With a high max-connections I get out of memory errors as there is potential for all the connections to make large requests. Ideally I'd like to be able to keep connections open so that clients can avoid the overhead of making new connections, but still limit the number of in flight responses to protect memory usage. Then if the client tries to make a request which can't be served, the connection is dropped with a 409 maybe? Or is the common way to deal with this to just have a fast timeout so clients can't hold open connections for too long, and make them re-open connections frequently? -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
