我在 Ubuntu 20.04 上使用 Ruby on Rails 6 和由 systemd 管理的 Puma 服务器。
On the official Puma website ,给出了两种设置类型:
那里说:
systemd and puma also support socket activation, where systemd opens the listening socket(s) in advance and provides them to the puma master process on startup. Among other advantages, this keeps listening sockets open across puma restarts and achieves graceful restarts, including when upgraded puma, and is compatible with both clustered mode and application preload.
[强调我的]
我有两个问题:
最佳答案
另一个优点是使用“系统端口”,例如以非 root 用户身份运行 puma 时使用端口 80。
关于ruby-on-rails - 使用带有套接字激活的 puma/systemd 有什么好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62346949/