I wanted to answer a few questions I have heard about Akka HTTP in Play 2.6. Hopefully this should clear up any concerns people have.
Play is switching for a few reasons. Play already uses Akka and Akka streams internally, and the model Akka HTTP uses for representing requests and responses is much closer to Play's. Some of the improvements we plan to make in 3.0 will bring them closer together. We are optimistic about the Akka HTTP project and where it's headed in terms of features and performance.
While both Netty and Play are active projects, it's much easier for us to work with the Akka team. This is in part due to shared philosophy and goals but also due to the fact that both teams work for Lightbend. This improved communication will help us implement new features and fix bugs and security issues more quickly.
What's the difference in performance?
Currently we have done no optimization, so the Akka server on 2.6.0-M1 is actually slower than the Netty server. This is expected. We are working with the Akka team to bring the performance to the same level, or hopefully better. You should see the improvements on
prune as we continue this work.
Our contributor Christian Schmitt also published a
gist with nice benchmarks showing akka-http performance (without Play) actually exceeds that of play-netty-server in his test case, in terms of both latency and bytes transferred. Based on this and similar benchmarks we have done, we expect to see comparable performance to Netty once we've removed the unnecessary overhead introduced in the conversion between Play and Akka HTTP models.
Does Play still support the Netty server backend?
Yes. We will continue supporting both Netty and Akka HTTP backends for the foreseeable future, but will prioritize new features on Akka HTTP.
What about HTTP/2?
HTTP/2 is coming as part of the improvements being made to the Akka HTTP server and will be included in a future milestone. We are interested in implementing it on Netty as well, but it's not a priority for the 2.6.0 release. We'd gladly accept contributions from the community, though.
Feel free to reply to this thread if you have any other questions.
Cheers,
Greg
--
Greg Methvin
Tech Lead - Play Framework