独立乘客动作电缆应用程序的运行状况检查端点

时间:2018-10-02 23:48:17

标签: amazon-web-services passenger actioncable health-monitoring aws-load-balancer

我正在使用AWS上的乘客独立运行Rails ActionCable服务器。

安装程序运行良好,我有以下配置文件

# cable/config.ru
require_relative '../config/environment'
Rails.application.eager_load!

run ActionCable.server

我正在使用此命令运行ActionCable

execute(:passenger, 'start',
  '--environment', fetch(:rails_env),
  '--port', '28080',
  '--max-pool-size', 2,
  '-R', 'cable/config.ru',
  '--pid-file', shared_path.join('tmp/pids/cable.pid'),
  '--log-file', shared_path.join("log/cable-#{fetch(:rails_env)}.log"),
  '--force-max-concurrent-requests-per-process', '0',
  '--daemonize'
)

现在的问题是,我试图将其放在AWS ALB(ELBv2)后面并设置适当的运行状况检查,以便以后可以设置一些自动缩放/故障恢复。但是,根据AWS文档,ALB运行状况检查不支持websocket。

是否可以与ActionCable服务器一起为负载均衡器设置常规的HTTP运行状况检查路由。 理想情况下,此路由应与我的/cable URL耦合(当电缆服务器关闭时,运行状况检查必须关闭)

有什么想法吗?

0 个答案:

没有答案