web services - c# Http Request KeepAlive Request Order -


My question about HTTP header: connection: keep- alive and connection: off

I am calling a web service the web service is hosted on multiple servers and the load is balanced. If I connection header is Keep- If Alive is set to

then two operations need to be done (2 calls to the service) - but I need to make sure Is that those Programming requests are sent to the server .

For example, if 3 servers were behind Load Balancer:

  1. Request # 1 (Operation # 1) - calls service and is sent to server # 1
  2. Request # 2 (Operation # 1) - calls service and server is sent to # 1
  3. Request # 3 (Operation # 2) - calls service And server # 2 is sent
  4. Request # 4 (Operation # 2) - calls the service and is sent to server # 2
  5. Request # 5 ( Operation # 3) - calls the service and all # 3 on request
  6. Request # 6 (Operation # 3) - calls service and is sent to server # 3
  7. Request # 7 (Operation # 4) - Calls the service and the server is sent in # 1
  8. Request # 8 (Operation # 4) - Service calls and it is routed Server # 1
  9. Etc.

    So my question is:

    In what request do I have to send / to stay up < / Code>?

    What does keep alive prepare the server for further request? Or is it telling the server to remember PREVIOUS request

    is? For the first request for each operation, use it at least:

    • First request: connection: keep-alive
    • second request: < Code> Connection: Close

      If you are going to have all the calls together then you can put it in all, but the last one, it is a bit faster

      • First request: connection: keep-alive
      • Second and beyond: connection: keep-alive < / Code>
      • Ntim request: Connection: Close

        However, it also depends on the load balancing implementation, but I think the standards are they.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -