The discussion revolves around whether Redis should be configured as a cache server or not, specifically in the context of Discourse installation. louirobert quotes the official Discourse GitHub page and Sidekiq’s documentation, which have conflicting recommendations.
louirobert is currently using a single Redis instance configured as an LRU cache and is seeking advice on whether to create another instance for Sidekiq. codinghorror mentions that Redis flushes are not ideal but not catastrophic.
The conversation takes a turn when Falco points out that the only officially supported Discourse installs are Docker-based, but louirobert explains that Docker is not suitable for their use case in China due to network blockages and slow image downloads. Instead, they use Capistrano for deployment.
The discussion then shifts to finding workarounds for the network errors encountered during installation. Falco and fantasticfears suggest using mirrors or proxies, such as RubyChina mirror, to resolve the issue. louirobert thanks the community for their help and decides to continue using their current Capistrano deployment.
“using two separate Redis instances, each configured appropriately, if you wish to use Redis for caching and Sidekiq”
So what should I do? I currently have only one Redis configed as a LRU cache. Should I make another one for Sidekiq, and how? Or I can safely ignore Sidekiq’s suggestion?
In general we try to avoid Redis flushes, but it’s not completely the end of the world if it does get flushed. Worst case, some emails might not get sent such as password resets and users will need to re-request.
The only officially supported installs of Discourse are the Docker based beginner and advanced installs. We regret that we cannot support any other methods of installation.
Yes, I know that. But for Chinese users, Docker is not a good choice: it’s intended for convenience but due to the network block(GFW) from within China, bundler install fails frequently for network error. So Chinese Docker user has to manually edit the Docker templates and configs and so on to fix that. It’s not easy, not to say that the Docker image download is VERY SLOW in China, and I’m afraid someday it may be totally unavailable. So a workaround for me is to use bundler package to avoid network download for installing Ruby Gems, which I’ve prepared in some special way before. In short, I need a way with highly custom installation script and Capistrano fits me. Rather complex, right?
It’s been moved to RubyChina mirror. I documented them here and there in Chinese.
You have more than one way to fix this, either by mirrors or by proxy. If you have a reliable proxy, you don’t even bother whether a mirror is perfectly stable to you. Besides, RubyChina mirror is rather stable comparing to the launch. Issues · ruby-china/rubygems-mirror · GitHub
Docker can also employ a proxy as described in the documentation.
If you are using Capistrano, you have more choices since you are a senior developer.
Thanks! I’ll look into the Docker solution again when I have to turn to it. For now, my Capistrano deployment has been working well. Thanks for all your help!