title: Using Akka Http for Multiple Bindings
body: <p>Using akka http to bind to a port and then route incoming connections is easy enough given the <a href="http://doc.akka.io/docs/akka/snapshot/scala/http/introduction.html" rel="nofollow">documentation</a>.  </p>
  
  <p>One question not addressed is how to bind multiple ports for different routes.  If I have multiple specifications:</p>
  
  <pre><code>val route1 : Flow[HttpRequest, HttpResponse,_] = ???
  val interface1 : String = ???
  val port1 : Int = ???
  
  val route2 : Flow[HttpRequest, HttpResponse,_] = ???
  val interface2 : String = ???
  val port2 : Int = ???
  </code></pre>
  
  <p>Should these be bound with one <a href="http://doc.akka.io/api/akka/snapshot/?_ga=1.42089507.723935664.1469018756#akka.http.scaladsl.HttpExt" rel="nofollow"><code>HttpExt</code></a>?</p>
  
  <pre><code>implicit val actorSystem : akka.actor.ActorSystem = ???
  
  val httpExt = akka.http.scaladsl.Http()
  
  httpExt.bindAndHandle(route1, interface1, port1)
  httpExt.bindAndHandle(route2, interface2, port2)
  </code></pre>
  
  <p>Or, should a different <code>HttpExt</code> be used for each bind?</p>
  
  <pre><code>Http().bindAndHandle(route1, interface1, port1)
  Http().bindAndHandle(route2, interface2, port2)
  </code></pre>
  
  <p>If either is valid, then are there any implications for using one method over the other?</p>
  
  <p>Thank you in advance for your review and response.</p>