简体   繁体   中英

Architectural overview for Resque on Heroku?

tldr; What pieces do you need to make a web app with a resque+resque_web dashboard?

I've seen the Heroku tutorial, and plenty of configuration examples, but it seems like there's a lot of complexity being glossed over:

  • Dynos don't have stable IP addresses, so how does the communication work between the web process, a resque process, and redis?
  • The Heroku docs imply that an additional communication service is necessary to coordinate between dynos; am I reading this right?
  • How many dynos and services are required to make a "basic" web app which:
    1. hands off some long-running to jobs to resque which
    2. saves its results in the web app's database, and
    3. is accessible by resque_web (mounted w/in the web app or standalone)?

Honestly, if someone could sketch a diagram, that'd be great.

Disclaimer: I don't have actually deployed a heroku app with resque. So this is information gleaned from: https://devcenter.heroku.com/articles/queuing-ruby-resque and checking into the example app.

  1. The web-dyno and the worker-dyno will not communicate directly with each other. They will communicate with each other via redis, and redis is provisioned on a specific DNS (which you can find on your apps resource page on heroku, after adding a redis plugin). These settings can be transfered into an .env file (via the heroku toolbelt plugin config). This env file can be used by foreman to set up the ENV variables. and these ENV variables you you use in your application to configure redis.

  2. Not sure, but the example-app does not imply any such necessary service

  3. 2: 1 web-dyno, 1 worker-dyno

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM