title: What effect does using Action.async have, since Play uses Netty which is non-blocking
body: <p>Since Netty is a non-blocking server, what effect does changing an action to using <code>.async</code>?</p>
  
  <pre><code>def index = Action { ... }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>def index = Action.async { ... }
  </code></pre>
  
  <p>I understand that with <code>.async</code> you will get a <code>Future[SimpleResult]</code>. But since Netty is non-blocking, will Play do something similar under the covers anyway?</p>
  
  <p>What effect will this have on throughput/scalability?  Is this a hard question to answer where it depends on other factors?</p>
  
  <p><strong>The reason I am asking is, I have my own custom <code>Action</code> and I wanted to reset the cookie timeout for every page request so I am doing this which is a <code>async</code> call:</strong></p>
  
  <pre><code>object MyAction extends ActionBuilder[abc123] {
    def invokeBlock[A](request: Request[A], block: (abc123[A]) =&gt; Future[SimpleResult]) = {
      ...
      val result: Future[SimpleResult] = block(new abc123(..., result))
      result.map(_.withCookies(...))
    }
  }
  </code></pre>
  
  <p>The take away from the above snippet is I am using a <code>Future[SimpleResult]</code>, is this similar to calling <code>Action.async</code> but this is inside of my Action itself?</p>
  
  <p>I want to understand what effect this will have on my application design.  It seems like just for the ability to set my cookie on a per request basis I have changed from blocking to  non-blocking.   But I am confused since Netty is non-blocking, maybe I haven't really changed anything in reality as it was already async?  </p>
  
  <p>Or have I simply created another async call embedded in another one?</p>
  
  <p><strong>Hoping someone can clarify this with some details and how or what effect this will have in performance/throughput.</strong></p>