Assuming I have my application configured in such a way that I have a NodeJS server running on a remote machine, and I have my database running on another remote machine. Assuming that I want to configure a Redis server for caching, would hosting the Redis server on another machine separate from my NodeJS server not add unnecessary overhead?
As I understand it, Redis is extremely fast because it is a database in memory. But if the Redis server is on another machine from my NodeJS server, I would have to make a network request from my NodeJS server to the Redis server, and if it is a lack of cache, I would have to make another network request to my server database (which is a total of 2 network requests). Wouldn't it be faster to dispense with Redis server caching, since you would be sure that only one network request is made to the database server? What is the typical way to configure the Redis server in a production environment?