Alex Rivera | Logout

Redis on web server front-end or database server back-end

Asked 2011-01-25T10:36:50.950
12

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?

Edit
Report

1 Answer

14

Pros of installing Redis on your Database Server:

  • The database size of Redis can become large if you have a lot of data. If you are storing stats and storing a lot of them, then your database can become a memory hog. You would not want to keep all that data in memory on your web server, as that could take away memory from your HTTP server.
  • Its called the database server for a reason

Cons of installing Redis on your Database Server

  • There will be a higher network response time when polling the server for data, as it is not local
  • If the server goes down, then you would be out of data.

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.

answered 2011-01-25T19:55:50.217

Your Answer