Can we store real time data in mongodb database?

Solution for Can we store real time data in mongodb database?
is Given Below:

I have a requirement where I need to store real time location data from an IOT device into mongodb database?
How could I achieve this using nodejs server?
My data rate is at one data per 10ms

So if your question is “Is nodejs server capable of handling the data rate ?” then yes node server can handle the specified data rate giver implemented properly.

But if your question is about mongodb then might underperform (it will handle it but underperform) if you make insert each entry individually.

My suggestion would be to use redis DB to store data of 1 min or 5 min depending on your server size and write those in bulk. If you want you can also make this decision based on total data point rather than time. So, on every 100 or 200 entry you can write data on mongodb.

Also this does not mean you will not get realtime data for the one min which is not written on mongodb. You have to read both data radis and mongodb while making query of data.