I'm building a Django application that uses PostgreSQL for data storage and Redis with Django Redis Cache for Django session storage. I'm also using RQ for asynchronous job queues. I've built the application so that my PostgreSQL database resides on a separate server. I have two questions:
Thanks.
Assuming you've really got just two machines to work with, I'd say Redis on the web server and RQ on the database server.
The cache close to its consumer and the non-latency critical RQ elsewhere.
However, if you've got an in-memory cache before any call to Redis then I'd say to put Redis on the db server too so that you free up all available cpu cycles for the web server.
Of course, in an ideal world each of these services would be on seperate hosts that you could resize acordingly (thinking amazon style seamless upgrade). To start with they could even be on the same physical hosts but identified using suitable host aliases to avoid building too many hosting assumptions into your code.
Completely agree that docker and ansible are great ways to go if you can.