Is it possible to run sidekiq on a separate host from the rails host? -


i'd setup sidekiq runs on separate host rails app, avoid weighing down web server when running memory-intensive background tasks.

what configuration details need at?

are there known best practices or configurations this?

edit:

to clarify, mean ask is, how configure rails sidekiq api calls (myworker.perform_async) run if sidekiq process isn't running locally?

edit clarify

before else, should understand when run perform_async, sticks jobs redis queue. sidekiq watches queue , runs jobs when come in. long app , sidekiq looking @ same redis server (and same database, of course), things work.

original answer

first, can guess, need duplicate checkout of code can run. no big deal.

secondly, need access database , redis servers on other box. means making sure ports open on other server. can tricky, b/c ideally don't want exposed open internet. usually, multi-box setup, you'll have 1 box exposed open internet. communicates rest of boxes on private ips:

public web server

runs apache/nginx , maybe app servers.

private app server(s) (optional)

runs app servers, if aren't running on public server. connects database , redis server.

private sidekiq server(s) (optional)

runs sidekiq. connects database , redis server.

private database/redis server

runs database , redis. of course can split out different servers if required.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -