In my application which is a HTTP service that exposes several API's that can be consumed by other services, I have a situation in which I have to call 2 different external services which would be a messaging service and another REST service.
I understand that for these I/O bound operations, it is a good practice to use a separate thread pool or ExecutionContext. I'm using the following to create a configuration for the custom ExecutionContext in my application.conf:
execution-context {
fork-join-executor {
parallelism-max = 10
}
}
I have a couple of questions:
- Is this going to create 10 dedicated threads?
- How do I know the size of the parallelism-max?
- Say if I'm going to use this execution context to make REST API calls, how should I size this?