Skip to content

Latest commit

 

History

History

02-AsyncWebAPI

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Scalability and performance in web applications demo

Demo source code of two Web API to demonstrate performance of using async with IO-bound and CPU-bound operations

Web API running IO-bound operation

Synchronous code

Asynchronous code

Performance compare

Using async/await makes it approximately ten times better!

Web API running IO-bound operation

Synchronous code

Asynchronous code

Performance compare

Synchronous CPU-bound

Asynchronous CPU-bound

Using async/await makes it worse in this case!

Summary

I still need more performance, what can I do?

  • Scale up
  • Scale out whole application using Docker/Kubernetes
  • Scale out only expensive CPU-bound operations to Azure Functions