Sunday, 22 March 2020

Need Advice

I have a field in a mongo collection which get's incremented whenever a new user enter the flow and gets decremented when the user exits. All other fields get updated only once but due to this field we are continuously doing r/W in DB for this collection. This user count is shown in the dashboard.Now, I have in mind the following approaches:1> Remove the field from the collection and create a separate collection for that(but I don't think this is going to solve the issue).2> We are also using Redis and we can place this field there and associate it with a key. But then I am worried about the size of Redis increasing considerably. Also, I am not much aware about how much persistent the data is going to be.Can someone please advice what should be the approach or if there is some other method in Mongo or Redis. I am also open in implementing other technology if it fits the use case.PS: Sorry if I am not able to explain it better.

Submitted March 23, 2020 at 04:06AM by dannymozart

No comments:

Post a Comment