ruby-on-rails - 使用带有套接字激活的 puma/systemd 有什么好处?

标签 ruby-on-rails ruby systemd puma

我在 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/

    相关文章:

    ruby-on-rails - 如何使用 Paperclip 正确保存 Base64 图像

    ruby-on-rails - rails : How to handle associations among namespaced models?

    docker - Docker 17无法在Centos 7中启动

    node.js - 从 systemd Node 应用程序生成的 Shell 脚本不编辑等文件

    ruby - 正确使用套接字和/或 Celluloid::IO

    node.js - Systemd 服务启动失败

    ruby-on-rails - rspec/guard 运行 minitest 并获取无效选项 : -f

    python - libv8 需要安装 python 2 才能构建 - Windows

    ruby - 用于存储文件的 SHA-1 哈希

    仅用于一个输入的 Ruby 多行输入