Monday, 30 December 2019

So how fast is Node with Mongo actually?

I'm wondering where are the bottlenecks and what kind of response time can we expect from talking to a MongoDB over a Node.js server.The thing is, I was quite mind blown by the single-query response times from the front-end to the backend-into the DB and back to the frontend. It's literally milliseconds, and that just blows my mind.That being the main idea, I understand how the Event Loop works and that if you write async calls in your server-DB interface, you should have a pretty stress free operation. Including optimizing your queries with .lean() and a strictly typed model structure when does Mongo start to lag? With thousands of concurrent DB queries, memory and CPU start to bottleneck, but at what point does that happen? What about the server? What kind of numbers start to take a toll on the server? I take it, it takes more to slow down the server than it does the database.Just thinking about things, preparing for scenarios where production apps get more traffic or a sudden spike. If you want to boast a little you can share your experience of how you tackled such events with this environment. Keep it simple, though. I love a good challenge. JavaScript rocks and I am so glad to be ridden of the former web-server infrastructure. Apache,nginx, bleeeeh...

Submitted December 30, 2019 at 09:59PM by sunny_lts

No comments:

Post a Comment