3

I'm building a Spring-Boot API that will serve a system that requires synchronous behavior despite the API doing async operations. I'm not too familiar with threads and I'm thinking this might be the right place to use them. I'm eager to hear some input.

Here are the restraints:
1. API will write to queue when request comes in.
2. The consumer of the queue will write to a database upon successfully completing request.
3. API will continually pool DB to see when request has been satisfied.
4. API responds to client.

The expectation is that the API will field a few hundred requests per minute, but should scale to handle maybe 10,000/minute one day.

This will live in Elastic Beanstalk, so we do get some flexibility with scaling.

One specific question is: Is there a way to take advantage of Java/Spring features to significantly decrease the load on the system, or is Spring capable of managing compute resources itself?

  • Is your question about asynchronicity or performance? – Robert Harvey Jan 26 '17 at 16:39
  • @RobertHarvey, I am looking for general input on the approach and low-hanging fruit with respect to improving performance. – Joe Essey Jan 26 '17 at 17:38
  • I'll leave expert opinions to the Spring experts, but from a fundamental software engineering perspective, my instinct would be to build a small prototype and hammer it with requests. That should tell you a lot about where the pinch points are, if any. – Robert Harvey Jan 26 '17 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.