I have two virtual private servers, first is web server front-end and second is database back-end. I want to use Redis for real-time stuff and my questions is: where should I install Redis? On web or database server?
Pros of installing Redis on your Database Server:
Cons of installing Redis on your Database Server
I personally would keep Redis on its own server, as you can be feeding it a lot of data, but it all depends on what environment you are working in. If you want speed to be the top priority (an extra 50ms or so would be unacceptable), then you should run it on your Web Server, as request times to 127.0.0.1 are a lot faster than an external network address, even if it is inside your local subnet. If not, then you should keep it off the web server.
Well if Redis is being used as you said, and your web process does not use a lot of memory, I would put it on both and have replication to the db server. This would provide redundancy and performance. That data seems more important than simple cache data so redundancy would be nice.
If your web server has less free memory and that free memory is smaller than your data size, keep it all on the db server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With