I just inherited the MVC4 API application, which acts as the main request sender for some other services. The basic structure of the application looks something like this:
[request] → [rest api] → [local processing] → [synchronous call to an external service] → [local processing of the response] → [response]
Local processing is mainly related to checking and storing data in db. Nothing heavy. In extreme cases, an external request may take from 1 to 200 seconds. The API typically processes several thousand requests per hour.
The application is located on one, small, azure cloud instance.
What bothers me is the flows. The entire process from the API handler method to the external call to the external service is configured as asynchronous:
public async Task<CustomResponseType> Post([FromBody] inputType) {
...
...
var response = await httpClient.PostAsync(someRequest)
return await response.Content.ReadAsStringAsync();
}
, -, async? , IIS , , , - . , , , IIS, .
: http://msdn.microsoft.com/en-us/library/ee728598%28v=vs.98%29.aspx?wa=wsignin1.0 , IIS -, " ". , async , , . IIS? ? , IIS ?