Commit Graph

25 Commits

Author SHA1 Message Date
Aliaksandr Valialkin 552dff6fd6 Do no hold memory (read/write buffers+RequestCtx data) for idle keep-alive connections. This should reduce memory usage for 100K+ concurrent keep-alive connections to the server 2015-11-03 14:16:41 +02:00
Aliaksandr Valialkin 1429b48135 Remove reference to conn from buffered reader and writer when releasing RequestCtx. This should help GC a bit :) 2015-11-02 19:11:09 +02:00
Aliaksandr Valialkin fb362174d7 initRequestCtx -> initCtx for the sake of consistency 2015-11-02 18:28:57 +02:00
Aliaksandr Valialkin 3eaecd9c6c Added ability to limit the number of concurrent client connections per ip 2015-11-02 15:09:45 +02:00
Aliaksandr Valialkin 7c83bade48 Clear response before calling request handler 2015-10-30 12:10:27 +02:00
Aliaksandr Valialkin 7ba1898d05 Return net.Addr from RequestCtx.RemoteAddr() and net.IP from RequestCtx.RemoteIP() instead of strings 2015-10-27 19:02:11 +02:00
Aliaksandr Valialkin 664d577260 Added SetCanonical() methods to RequestHeader and ResponseHeader 2015-10-27 13:36:42 +02:00
Aliaksandr Valialkin d70261286c Added CopyTo, VisitAll and *Bytes* helper functions to Args, RequestHeader and ResponseHeader 2015-10-27 12:53:33 +02:00
Aliaksandr Valialkin a1fca0f209 Fixed connection leak on pending connections queue overflow 2015-10-26 15:15:58 +02:00
Aliaksandr Valialkin 27862cc299 Fixed data races in Request.ReadTimeout() and Response.ReadTimeout(). Documented that the request and response instances cannot be used after ErrReadTimeout error 2015-10-26 14:13:33 +02:00
Aliaksandr Valialkin d76f5c5aba Log connection-related info on error 2015-10-23 19:38:16 +03:00
Aliaksandr Valialkin 40e775dce5 Added TimeoutHandler 2015-10-23 14:56:01 +03:00
Aliaksandr Valialkin 7874b9245a Properly implement request read timeout via SetReadDeadline(). Implement response write timeout 2015-10-23 13:26:15 +03:00
Aliaksandr Valialkin c842617b00 microoptimization: convert io.ReadWriter to remoteAddrer only before use 2015-10-23 13:01:09 +03:00
Aliaksandr Valialkin 9fc3f767e6 Added timeout covering full request read 2015-10-22 14:32:20 +03:00
Aliaksandr Valialkin 9a1e1f2e61 Renamed ServerCtx to more appropriate RequestCtx 2015-10-22 11:46:33 +03:00
Aliaksandr Valialkin db43ebb688 Access ResponseHeader.server directly when writing responses via Server. This improves Server benchmarks by a little margin 2015-10-22 11:41:43 +03:00
Aliaksandr Valialkin b1a76330d5 Do not suppress logger in server benchmarks 2015-10-21 16:34:12 +03:00
Aliaksandr Valialkin 1ac3807782 Added cache for RequestHandler data into ServerCtx 2015-10-21 16:29:03 +03:00
Aliaksandr Valialkin d0deaebb43 Added request start time to ServerCtx 2015-10-21 16:09:35 +03:00
Aliaksandr Valialkin 37cb5a0c67 Added status codes from net/http 2015-10-21 16:02:53 +03:00
Aliaksandr Valialkin d49d752a65 Substituted racy ServerCtx.Steal() with ServerCtx.TimeoutError() 2015-10-21 15:05:44 +03:00
Aliaksandr Valialkin ee62382f34 Uniformly process all headers 2015-10-20 12:36:33 +03:00
Aliaksandr Valialkin b942a09cbe Added link to godoc 2015-10-19 01:25:11 +03:00
Aliaksandr Valialkin a049630bca initial commit 2015-10-19 01:21:09 +03:00