Request routing by echo is not stable as httpserver default #2363
Unanswered
vuhoanghiep1993
asked this question in
Q&A
Replies: 2 comments 3 replies
-
You should start by excluding you own code from the tests to pinpoint the problem area. For example start with: func main() {
e := echo.New()
e.GET("/", func(c echo.Context) error {
return c.String(http.StatusOK, "OK")
})
s := http.Server{
Addr: ":8080",
Handler: e,
}
if err := s.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatal(err)
}
} does this cause response time to increase? For your own code try to see if this is caused by some specific routes. For how long/how many requests you need to run to see decrease? Are there errors in logs? NB: |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thank you for your support, I found problem because my middleware handle request not right, when I comment it work perfectly |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a problem when use echo as http router
When use default server like https://gobyexample.com/http-servers and use echo as router
I found the response time by echo is increase and not stable as golang httpserver default when use jmeter to test ? I don't know why? Does anyone test this case
Beta Was this translation helpful? Give feedback.
All reactions