title: java rate limit logic
body: <p>I'm seeking algorithm to design multithreading application in java where each thread write data to db. I want to control the number of records written to db per second.</p>
  
  <p>the application gets RPS (records per second) param and approximately generate those many load.</p>