Redis store for useDb cache
Do you want to request a feature or report a bug? Feature
What is the current behavior? Connections created using useDb are cached in process memory, leading to high memory usage in clustered apps.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior? Option to store connections in redis to share between clusters
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version. Node v10.21.0, Mongoose v5.9.14, MongoDB v4.2.8
Oops, I realized redis isn't the solution to this problem because a connection object can not be stored with it. Is there any other way to share a mongodb connection between clusters?
No there isn't, you can't share a socket between multiple machines AFAIK.