Re: [go-nuts] http server request queue

2017-10-30 Thread Jonathan Yu
chi includes a middleware for this, see: https://github.com/go-chi/chi/blob/master/middleware/throttle.go and some examples here: https://github.com/go-chi/chi/blob/master/_examples/limits/main.go I haven't used it myself, but it seems to support having a fixed backlog as well, which is important

[go-nuts] http server request queue

2017-10-28 Thread Keith Brown
Here is a scenario: a high traffic site which executes costly operations (database / filesystem / compute heavy operations). The web server is running standard go/http/server. I would like to handle at most 100 requests and the remainder to queue -- all while the client (curl) is waiting. Are t