5

The question is why Playframework team decided to migrate from Netty to Akka? Is it more efficient in performance meaning?

Dante
  • 451
  • 4
  • 12

1 Answers1

10

Play switched to using Akka by default because:

  • 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.
  • It's much easier for the Play team 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. It is hoped that this improved communication will help the Play team to implement new features and fix bugs and security issues more quickly.

The Play team believe that performance on Akka is at least as good as it is on Netty. Anyone who find this not to be true is encouraged to raise an issue with them.

All the above taken from an email thread on the Play dev list.

Note: Play continues to support Netty so if you'd rather use Netty then you can manually select it:

If for some reason you have both the Akka HTTP server and the Netty HTTP server on your classpath, you’ll need to manually select it. This can be done using the play.server.provider system property, for example, in dev mode:

run -Dplay.server.provider=play.core.server.NettyServerProvider

Community
  • 1
  • 1
glytching
  • 44,936
  • 9
  • 114
  • 120
  • 2
    One day they said that Play and AkkaHttp are "not naturally compatible" (https://www.playframework.com/documentation/2.5.x/AkkaHttpServer#known-issues). I hope they sorted it out for now – Mitrakov Artem Sep 20 '18 at 10:02