SNA
SNA

Reputation: 7728

How asp .net handles concurrent user requests?

This is for looking for an answer to a question i faced in a technical discussion.

In a travel booking website there were 50 ticket's available. Now only one more ticket left.2 users hitting the web server at the same time, considering Asp .net can handle concurrent requests.

q. 1) How asp .net handles this requests?

2) There is a way for one of the user to get that last ticket.what is it?

I think understanding asp .net architecture deep is require to answer this question.

can anyone give me some insight.

Thanks SNA

Upvotes: 3

Views: 1638

Answers (2)

BluesRockAddict
BluesRockAddict

Reputation: 15683

You shouldn't really worry about front-end concurrency in this case, IIS will take care of that for you. Much more important would be proper database implementation with carefully selected transaction isolation levels, deadlock handling etc.

Upvotes: 2

Darin Dimitrov
Darin Dimitrov

Reputation: 1038930

1) How asp .net handles this requests?

Concurrently.

2) There is a way for one of the user to get that last ticket.what is it?

It will depend on what you mean by getting a ticket. If by getting a ticket you mean updating a field in the database then it's up to your database to handle this. If you use transactions it's probably the first SQL query that initiates the UPDATE that will succeed and the second will fail if you use some sort of constraints at the database level. But once again all that will depend on the specific implementation.

Upvotes: 4

Related Questions