How many concurrent requests per route can Spark support?

Viewed 628

I need to handle many (~1000) concurrent requests per route but Spark seems to process them sequentially. Is there some configuration parameter I can set?

1 Answers

Spark has a 200 thread ThreadPool. Typically 1000 requests shouldn't be a problem unless they're very slow requests. You can configure the ThreadPool, but it probably won't help if you've noticed the server can't handle your load. If you need a simple framework like Spark which supports async handling, you can check out https://javalin.io/

Disclaimer: I'm a maintainer for both Spark and Javalin.

Related