TCP Socket communication between processes on Heroku worker dyno

前端 未结 5 2031
难免孤独
难免孤独 2020-12-16 17:32

I\'d like to know how to communicate between processes on a Heroku worker dyno.

We want a Resque worker to read off a queue and send the data to another process runn

5条回答
  •  庸人自扰
    2020-12-16 18:10

    Heroku only lets you listen in a given port ($PORT) per dyno, I think.

    I see two solutions here:

    • Use Redis as a communication middleware, so the worker would write on Redis again and the listener process, instead of listening in a port would be querying redis for new jobs.

    • Get another heroku dyno (or better, a complete different application) and launch there the listening process (on $PORT) and communicate both applications

提交回复
热议问题