Handling 5000 API Calls per Second in a Financial/Trading App – Seeking High Performance Solution #142227
Unanswered
ManishRanaDev
asked this question in
Programming Help
Replies: 1 comment
-
Hello @ManishRanaDev Handling 5,000 API calls per second is a significant challenge that requires careful optimization at multiple levels of your application stack. 1. Ensure Non-Blocking Code
2. Implement Clustering and Load BalancingNode.js Clustering: Use the cluster module to utilize all CPU cores effectively.
3. Use Worker Threads for CPU-Intensive TasksOffload Heavy Computations: Utilize the worker_threads module to handle CPU-bound tasks without blocking the event loop.
By applying these strategies, you should see significant improvements in your application's ability to handle high volumes of parallel API calls with low latency and fast response times. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
I am working on a Node.js-based financial/trading app where the system needs to handle scenarios like placing 5000 API calls in a second. These can be the same or different APIs. I want to process all these requests in parallel with a high response time and low latency.
What would be the best approach for optimizing Node.js to handle such a high volume of parallel API calls? I'm looking for a solution that ensures low latency and fast responses. Any guidance or suggestions would be highly appreciated
Here’s what I’ve tried so far:
Implemented Node.js clustering to leverage all CPU cores. Used worker threads for parallel task execution. Conducted load testing using Artillery at 500-1000 requests per second (RPS). Despite these efforts, I'm facing issues with timeouts and high response times, particularly under load.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions