Nick Fox
Nick Fox

Reputation: 31

How many concurrent requests per route can Spark support?

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?

Upvotes: 3

Views: 930

Answers (1)

tipsy
tipsy

Reputation: 402

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.

Upvotes: 1

Related Questions