iis - IO and CPU Bound calls with Async APIController in a Four layers application -


i have 4 layer application:

  1. html ui layer making ajax calls ui service (web apicontroller).
  2. ui service web api controller. ui service calls app service.
  3. app service layer has methods call database directly through ef make calls other domain services (web apis).
  4. domain service web apis too.

the first, second , third layers hosted on 1 machine. domain service hosted on different machine. sql server hosted on different server.

my questions are:

  1. how can differentiate between cpu bound , io bound calls? calls made ui service app service, cpu bound because exist in same app domain?

  2. are calls app service domain service io bound because calls go through network? case calls made app service db also?

  3. should make methods task based async/await take advantage of scalability? mean scalability iis html ui layer, ui service , app service have hosted can process more requests?

  4. what happen under heavy traffic on website if don't have async apicontroller? users 404 because iis can't handle many requests?

  5. what happen under heavy traffic scenario on website if have async apicontroller? users see ui although little bit late because iis can handle requests queued?

  1. a call on network io bound caller. kind of boundedness present @ callee depends on implementation.
  2. yes.
  3. "can process more requests" if number of requests concurrently process (at same point in time) exceeds 100 might start see benefits going async. before point throughput benefit negative (more cu load) , productivity costs non-trivial.
  4. requests queue , more , more threads spawn. can lead death. situations under can problem limited. chances don't have 100 concurrent requests going because overload servers 10x. prime case async on server slow backend services (like web services or azure stuff).
  5. only if app can handle load responses arrive. pretty logical. async gets more throughput if thread-pool (if configured) not able process outstanding work. never case.

for discussion when use async previous posts:https://stackoverflow.com/a/25087273/122718 https://stackoverflow.com/a/12796711/122718 does async calling of web service make sense on server?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -