Hi,

I am trying to utilize spring cloud config server for config file serving from a git backend.

Given correct parameters, org.springframework.cloud.config.server.resource.ResourceController serves the requested file successfully over http.

However, there seems to be a contention when handling concurrent requests. Parallelizing file requests in the client side does not help since there seems to be a contention in org.springframework.cloud.config.server.resource.ResourceController.retrieve method which is declared as synchronized.

The contention can be verified by java flight recorder

jfr

using the simple sample apps.

https://github.com/simpleusr/testapps

Is such a degree of mutual exclusion really required when serving files? Can this be improved?

Regards

Comment From: ryanjbaxter

Not entirely sure why, there might be some history there I am not aware of because its been syncronized for a while now.

Comment From: hpoettker

See also #2069.

Comment From: spencergibb

Duplicate of #2069