We have a API server written in go that is based on gin-gonic. We've noticed something odd that has led us to believe that it is processing requests serially rather than the expected parallel operation. Consider this log file:
[GIN] 2016/04/05 - 17:24:37 | 200 | 5.738742ms | 64.... | POST /api/v2/d/ [GIN] 2016/04/05 - 17:24:40 | 200 | 3.262816256s | 64.... | POST /api/v2/d/ [GIN] 2016/04/05 - 17:24:42 | 200 | 3.563779ms | 64.... | POST /api/v2/d/ [GIN] 2016/04/05 - 17:24:43 | 200 | 105.429Âµs | 64.... | POST /api/v2/d/ [GIN] 2016/04/05 - 17:24:43 | 200 | 808.824Âµs | 64.... | POST /api/v2/d/
Watching the log in real time, the last 3 entries are not displayed until the second call finishes. These five calls are made to the API within 5 milliseconds of each other. We expect that the calls should be processed in parallel. This implies that all the calls should complete by 17:24:40, not 17:24:43. IE: That the server spawns a new thread/goroutine when the connection is made to process the request. If that is not the case does anyone have any suggestions for a package that does work that way.
This is our first project with gin-gonic and I'm wondering if there is some configuration parameter that needs to be set. Any ideas/suggestions are appreciated.