Use HTTP persistent connections for web API drivers?
Many websites, and even database servers such as Couch DB & Neo4j provide their data over 开发者_如何学CHTTP. Should people implementing client libraries for those APIs use persistent HTTP connections?
Yes. "A significant difference between HTTP/1.1 and earlier versions of HTTP is that persistent connections are the default behavior of any HTTP connection. That is, unless otherwise indicated, the client SHOULD assume that the server will maintain a persistent connection, even after error responses from the server." See http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html for more info.
精彩评论