Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does a web server handle a lost connection, for example the client sends a request and due to some problem got disconnected from the server before the latter could reply with a response, what does a typical web server do in these kind of scenarios

share|improve this question

closed as not a real question by Michael Hampton, pauska, Chris S May 23 '13 at 17:03

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

It would be helpful to answer the question @Vamsi didn't realize he was asking. It would help others who discover this post as well. A search on "http is stateless" will explain what's going on. There are even discussions here and on Stackoverflow about this. – gbarry Jan 31 at 20:22
up vote 1 down vote accepted

Browsers make requests. Web servers reply to requests. They neither know nor care what happens once that reply has been sent. Think of it like the UDP protocol.

share|improve this answer
I'm asking what happens when the browser that made the request is no longer available to listen to that request, will the server still reply ? – Vamsi Sep 6 '12 at 9:39
@Vamsi, I really thought I was clear on that. When a web server receives a request from a browser it sends a response. That's all that happens. The web server cannot even know if that browser is still listening or not, let alone care about it. There are some application methods used to maintain a psuedo connection but the web server is not directly involved in that. It listens and it replies. It does nothing else. It's like light leaving a torch/flashlight. It goes out but the source knows nothing about it from that point onwards. – John Gardeniers Sep 6 '12 at 9:44
"The web server cannot even know if that browser is still listening or not, let alone care about it." - it does know and care about it, and will terminate that connection (= won't try to send more and it will free resources, etc). – Karoly Horvath Sep 6 '12 at 10:38
@yi_H, I think you're confusing the web server level with the application level. – John Gardeniers Sep 6 '12 at 23:10
@John Gardeniers: let's assume I'm requesting a 1G file download from the webserver, and then I disconnect.. what do you think will happen? – Karoly Horvath Sep 7 '12 at 8:24

It doesn't do anything. What's it supposed to do? The connection is gone.

share|improve this answer
I mean will it still reply ? – Vamsi Sep 6 '12 at 9:37
If the TCP connection is gone, how is it going to reply? – ThatGraemeGuy Sep 6 '12 at 14:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.