I’m making a NodeJS express API which acts simply as a forwarder to other third party APIs.
Example: A call to /user
API in my express app will forward it to some other public API after applying some logic. These are mostly non blocking async calls.
What are the limits of number of parallel requests an Express application can serve?
More specifically:
- Let’s say 1,000 apps call this endpoint at a given moment, will Express be able to manage all of them individually?
There are 2 parts to this question:- Will Express as a server be able to take in 1,000 requests, and second
- will Axios as a communication layer to outer world be able to process 1,000 calls in parallel?
- Do I need to manually implement some queuing logic for this to work? If no, what is practically the maximum number of parallel that can be supported?
- Is there any architectural pattern that is considered best practice for these kind of scenarios?
I think NodeJS is a better technology to use here compared to Java, because Node is by default single threaded asynchronous runtime. In Java, I’ll have to manually spin up parallel threads to the same task as above, but NodeJS event loop will smartly manage the async calls. Is that correct?