DEV Community

Discussion on: Advanced Node.js Topics: Caching.

Collapse
 
raulingg profile image
Raul Robinson Quispe Mendez • Edited

The real world examples you are given here are not real world at all. You’re querying against a MongoDB hosted on Mongo Atlas from a local API Server, on top of that your hosting the Redis Server in your local. That my friend is not even close to a real world setup. I’m not even asking you how far you are from the MongoAtlas server you’re hitting.

Remember that the number one performance culprit is latency. You probably want to put your network army close to the battle (end user), otherwise you lose the war.

Collapse
 
osam1010 profile image
Osama

Hey Raul,
first of all, I don't have my own server so I rely on cloud providers, I'm sorry I didn't make the benchmarks from my hosted server on heruko I did tests on my local environment.

seconds what I meant by real world I didn't mean the code itself, I mean the server as it is, will be used, I know it's not a typical real-world code but I'm still learning!

third, when I used this code I didn't mean to show off or to teach how to write real world, I just added that as an example to show you how caching can saves a lot of time and improve your deployed server performance and make users happy.