title: Allocation of data to Concurrent users
body: <p>In our application we use microservices architecture. One of the microservice is allocation microservice.
  This allocation microservice functionality is to assign 100 different records to the user who has logged in our application, from Postgres DB which has a total records of 1 million in one of the table. </p>
  
  <p>Currently we are using spring boot and we are handling it using Optimistic locking mechanism. For even, When around than 100 concurrent users are using the application, the performance of the application is drastically slow, and the allocation microservice takes about more than 2 minutes to allocate the data to users. Once the data is allocated, we are storing the data in redis.</p>
  
  <p>(Its a DB update, we change the status from "assigned" to "allocated" and also update the "assignedTo" field to the particular user. The use case is, no two same records should be allocated to the same user, to avoid this we are using "Optimistic lock" and the performance of the System is very slow in this case. Any other solutions to improve the performance ?)</p>
  
  <p>Any other solution to improve the performance apart from Optimistic locking?</p>