What webserver uses akka akka-http and how can I g

2019-06-24 06:19发布

问题:

I'm using akka and akka-http 2.4.2 and I'm trying ti understand the internal components of them.

What does akka and akka-http use to start a rest web-service?
It uses an embebedd webservice? (like Jetty?)
How do I get the version of it?

The code I run to start my rest web-service is:

implicit val actorSystem = ActorSystem("system")
implicit val actorMaterializer = ActorMaterializer()

val route: Route = {
      blablabla ...
}

val bind = Http().bindAndHandle(route, "0.0.0.0", 8080)

Thanks.

回答1:

There is no webserver used by akka http. Akka http binds to a port on it's own and it speaks the Http protocol over Tcp itself, not relying on any other third party libraries to do that part for it. This is different than a library like Unfiltered which defines a common abstraction for Http request handling, then provides several implementation options like Netty and Jetty that the user can choose from.