The real solution here is to simply write your code with an appropriate amount of abstractions, and then start with the simplest / cheapest backend that fits your needs. When it comes time to add Redis, or shared memory, or both, only a small amount of your code needs to be adjusted for the new backing store.