Closed johnseekins closed 2 years ago
Rough testing of speed improvements:
with channel:
http_request_time_secs_total_sum{method="POST",path="/count",status_code="0"} 0.00023863
without channel:
http_request_time_secs_total_sum{method="POST",path="/count",status_code="0"} 0.000417342
There is currently a small chance of lost data on shutdown. We'd need to add a waitgroup/context to watch for during shutdown. We do at least close the channel on sigint/sigterm to the http server, so the window of potentially lost requests is fairly small (if we can't process our backlog in 5 seconds, we lose data).
https://github.com/civic-eagle/statsd-http-proxy/issues/5
This should speed up individual http requests, which will make clients happier.