1

Is there any real benefit of using async/await in an ASP.NET application if the only I/O calls are to a backend SQL Server database that is not using the ASYNC parameter in its connection string?

2
  • 1
    Is the SQL server scalable? Commented Oct 11, 2016 at 18:59
  • No, I am assuming a simple SQL Server instance without clustering. I have a strong suspicion that in this case it is pretty much useless to pollute the code base with async but I am looking for a tangible reason to confirm or a counter example. Commented Oct 11, 2016 at 19:01

1 Answer 1

2

Most likely, async is not going to help you in your situation (that is, with a single SQL Server instance). This is assuming that most (or all) I/O-bound ASP.NET requests hit the database.

As I stated in my intro to async on ASP.NET article:

A decade ago, a common architecture was to have one ASP.NET Web server that talked to one SQL Server database back end. In that kind of simple architecture, usually the database server is the scalability bottleneck, not the Web server. Making your database calls asynchronous would probably not help; you could certainly use them to scale the Web server, but the database server will prevent the system as a whole from scaling.

In contrast, for Azure SQL (or even SQL Server clusters), async on ASP.NET may be beneficial. For even more scalable backends (NoSQL or web APIs), async is even more likely to be beneficial.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, Stephen. I have been reading your articles the last few days, and they have been invaluable for my understanding of async and its history. This really confirms what I suspected and understood from them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.