How to improve concurrency from the code layer

When the amount of concurrency over 500 , the rest service response time exceeds 4000 milliseconds,Is there good way to increase the amount of concurrency from the code level? thanks