Play starts with Akka HTTP as the default service backend from 2.6.x
Source: Internet
Author: User
Before play 2.6.x, the play defaults to using the Netty service backend. By 2.6.x, the default service backend is replaced with Akka HTTP, but it is still possible to manually select the Netty service backend. To upgrade to 2.6.x, you need to be aware of this. Because Akka HTTP servers are slower than Netty HTTP servers. So if you are particularly sensitive to performance, you will need to manually select the Netty service backend when you upgrade.
As for why the selectivity can be dropped to the Akka HTTP service backend, the play project's tech Leader Greg Methvin gave some explanations at the Google online forum.
Hi everyone,
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.
Why is play switching to Akka HTTP as the default server? Play are switching for a few reasons. Play already uses Akka and Akka streams internally, and the model Akka HTTP uses for representing requests and responses I s much closer to play ' s. Some of the The improvements we are in 3.0 would bring them closer. 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 of that both teams for work. This improved communication'll help us implement the new features and fix bugs and security issues more quickly. What ' s The difference in performance?
Currently we have do no optimization, so Akka server on 2.6.0-m1 are actually slower than the Netty server. This is expected. We are working with the Akka team to bring the performance level, or same hopefully. You should to the improvements on prune as we continue this work.
Our contributor Christian Schmitt also published a gist with nice benchmarks showing akka-http (performance) Actually exceeds of that of play-netty-server in he test case, in terms of both latency and bytes. Based on this and similar benchmarks we have have done, we expect to the "comparable performance to Netty once we ' ve removed the Unnecessary overhead introduced the conversion between play and Akka HTTP models.
Does play still support the Netty server backend?
Yes. We'll continue supporting both Netty and Akka HTTP backends for the foreseeable future, but'll prioritize new features On Akka HTTP.
If you are want to the "Netty" server, please the Netty Server documentation.
What about HTTP/2?
HTTP/2 is coming as part of the improvements being made to the Akka HTTP server and'll be included in a future milestone . We are interested in implementing it on Netty as, but it's not a priority to the 2.6.0 release. We ' d gladly accept contributions from the community, though.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.