jdegoes/blueeyes — Issue #24: Health uri exhibits high load
Author: fooblahblah
Created: 2011-10-10 19:00:22+00:00
State: open

I have a simple service I use to measure performance changes to different BlueEyes updates. After running 1M requests through a service with a simple GET handler, I see the health requests generate up to 80% CPU load and take quite a long time to return (avg 2.5 secs). This is ironic since it causes load by our monitoring in production.

trait BenchmarkService extends BlueEyesServiceBuilder with HttpRequestHandlerCombinators with HttpRequestCombinators with BijectionsChunkJson with BijectionsChunkByteArray with ServiceVersion {
private val _logger = Logger.get

val benchmarkService = service("benchmark", serviceVersion) {
healthMonitor { monitor =>
requestLogging { context =>
request {
path("/ping") {
produce(application/json) {
get { request: HttpRequest[ByteChunk] =>
HttpResponse[JValue](content = Some(JString("pong"))).future
}
}
}
}
}
}
}
}

Hitting http://localhost:8080/blueeyes/services/benchmark/v1/health will generate the high load.