Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a Meteor app which uses Redis?

I stumbled upon this package recently redis-oplog which seems to be a very good package. Given that I do not have any experience with Redis, I did some search and found out some say that Redis is even better than Mongo Oplog therefore I want to give this package a try with my Meteor project. However I have some questions regarding deployment before I can try it:

  • Do I need to have separate servers dedicated for running Redis?
  • If I can not afford to have servers for Redis, is it ok to run Redis in the same server with the Meteor app?
  • If the my Meteor app has many instances and so does Redis (not sure if Redis could have/need many instances?), how do I make them work all together?
  • In case I manage to use Redis for production, what changes should I make to my Mongo servers? because Mongo Oplog is no longer in use at that point
like image 245
kkkkkkk Avatar asked Jan 15 '17 11:01

kkkkkkk


2 Answers

  • Yes you need to have separate instance for redis, you must setup a fault tolerant system using redis-sentinal, you can find different configurations and setups with pros and cons here https://redis.io/topics/sentinel
  • If you cannot afford to have servers for Redis you can run it on server where you have installed your mongodb instance if you have one.Last option is to run it where your meteor instance is, redis-oplog will suerly be more efficient than mongodb-oplog as per the data available.
  • There are samples for redis architecture in the link given above. Also connecting to redis is same as connecting to mongodb
  • Mongo changes depend on your other usage for mongo.
like image 149
Keval Gohil Avatar answered Nov 15 '22 03:11

Keval Gohil


Ansible is a nice deployment tool for all kinds of software. We have good experience with the Ansible role for Redis by David Wittman https://galaxy.ansible.com/DavidWittman/redis/ this can deploy a single instance (for development, on one box with all our components) or as a production cluster. Meteor can also be deployed by roles from Galaxy, but I did not use those.

like image 22
bbaassssiiee Avatar answered Nov 15 '22 05:11

bbaassssiiee