Ahhh… so this issue took me a while to figure out and caused some frustration: I use session variables in my node.js app, and locally everything working perfectly fine. However, on heroku, some mysterious behavior was taking place: sometimes session vars were preserved and working OK, but sometimes they would just get blank/undefined, and there was no pattern to this madness!

I took a few steps to troubleshoot this:
1) Moved from memorystore to Mongo DB session store, as recommended for production environment
2) Opened up Charles (network monitoring tool) to make sure all requests were processed, since I’m switching a parameter in my app and updating my session variable via AJAX call
3) Took a hard, long look at my heroku logs and found that I had TWO web processes running! So if I set a variable with one process, then the page reload is done by another web process, of course all session info gets lots (however, I’m still thinking since it’s Mongo storage it should have preserved the session vars).

For now, the app is working as expected, phew. However, I’m going to look more into why the values are not being read from Mongo and how this can still work when multiple processes are running (for the scaled up version of the app)

I noticed that the coolest things (in my opinion) are not web or mobile apps anymore, but actual real life objects and interactions tied to digital world. So inspired to build a physical thing connected to an API.