Hey Guys, I am trying to benchmark keto and when I...
# talk-keto
m
Hey Guys, I am trying to benchmark keto and when I created a basic route which is not processing anything just writing a string message to the herodot writer, the avg response time is too high, same thing when I am trying to do with a basic application having the same http package and writer the results are way too low then keto server, this is causing the keto server to perform very poorly, I am sharing my test results as well, please tell me if there is any configuration that needs to be changed in order to achieve the same level of concurrency. These two are the results with hitting the api with 500 and 1000 threads ramp up being 2s and 5s, duration for which the test was ran was 20 and 30s respectively. The first request is of an keto basic route
func (h *Handler) basicRouteTest(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
l := h.d.Logger() l.Debug("Basic Route Test") h.d.Writer().Write(w, r, "Basic Route Test") } The second one is a simple application route without herodot as json writer, And the third one is in the same application a route with herodot as json writer. You can see the difference in response times. Please let me know if you need anything else from my end.
s
so you are not really benching keto, but added your own endpoints to bench the libraries and setup we use? interesting results, can you open a draft pr with your code so we can recreate? did you also try to write native go benchmarks hitting the server? I'd be interested where the most time is spend...
m
Yeah That's what I am also trying to figure out where the most time is being spend, and about benchmarking keto, I tried that as well but given that a basic route takes so much time then first need to resolve the underlying issue that is causing so much time in handling the request. Also all I did was added this function in the handler and exposed the route no major change is required to create this
func (h *Handler) basicRouteTest(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
l := h.d.Logger()
l.Debug("Basic Route Test")
h.d.Writer().Write(w, r, "Basic Route Test")
}
Also do you guys have any tool integrated for getting the in depth analysis for the time spend?
s
There is tracing, but not as fine grained You could add that though
Tracing based on opentelemetry
m
Hey @steep-lamp-91158 I have created a draft PR for you to take a look at the issue and recreate it at your own end. https://github.com/ory/keto/pull/1128 Please take a look at it and let me know if we can sort this out.