I have an app running with:
Is this architecture sufficient if the application needs scalability (this is only for HTTP / REST requests) for:
500 request per seconds (each requests only fetches data from the DB, those data could be several ko, and with no big computation needed after the fetch).
20000 users connected at the same time
Where could be the bottlenecks ?
Where Node. js really shines is in building fast, scalable network applications, as it's capable of handling a huge number of simultaneous connections with high throughput, which equates to high scalability.
Node.js offers Easy Scalability js uses a single thread to handle non-blocking I/O calls, which means that it'll take fewer resources for the application to accept concurrent connections compared to traditional approaches.
Conclusion. Node. js is a JS runtime environment that is also an HTTP server with some event-driven features and has many drawbacks in terms of concurrency and high load or user requests to handle a large number of users concurrently. Nginx has the best performance in this case, and it provides the best performance.
Using node-postgres , you will be able to write Node. js programs that can access and store data in a PostgreSQL database. In this tutorial, you'll use node-postgres to connect and query the PostgreSQL (Postgres in short) database. First, you'll create a database user and the database in Postgres.
For the specified load (500 simple requests/second), I wouldn't have thought that this will be too much of a problem. And my guess would be that a cluster of node instances will not even be necessary.
However, as you've only got a single instance, when it comes to scaling up, that is most likely going to be your bottleneck. You've also got the additional issue that this would be your single point of failure (I'm not familiar with Postgres, here were working with an Oracle cluster and dataguard which means that we've got a backup database cluster to mitigate that).
If you do not require a relational data model, then something MongoDB may be a more scalable choice.
One other thing to bear in mind is your network infrastructure. If you are going to add clusters/nodes, then make sure that the network can handle the distributed load.
One last thing: Generally, it is impossible to determine whether an application on an architecture can handle a particular load without performance/volume/stress testing, so the answer is a resounding "maybe".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With