4

我有一个heroku 应用程序,它有两个进程——一个web 和一个worker,都在同一个应用程序中。我计划整个月都在 ps:scale 1x 中运行这两个。这基本上意味着我每月超过 750 个免费测功小时并且必须支付一些费用。

一个应用,两个进程

应用程序

  • 网站:gunicorn myproject.wsgi --log-file -
  • 工人:芹菜 -A myproject 工人 -B -E -l info -c 1

我正在考虑将它们拆分为两个独立的应用程序,Web 和拥有自己应用程序的工作人员,并通过 REST API 在它们之间进行通信。由于这是两个应用程序,因此每个应用程序分别如下。这样,两个应用程序将分别低于 750 小时,并且不会收费。

两个应用程序,每个应用程序都有一个进程

应用程序1

  • 网站:gunicorn myproject.wsgi --log-file -

应用程序2

  • 工人:芹菜 -A myproject 工人 -B -E -l info -c 1

与第一种方法相比,这样做的优点和缺点是什么?谢谢

4

1 回答 1

0

As far as I can see the only Pro to this approach is the cost savings, the cons are having to jump through hoops to communicate over the REST API.

于 2014-12-03T22:46:06.107 回答