【发布时间】:2020-08-12 10:42:31
【问题描述】:
我有一个使用 nginx 作为反向代理和独立乘客的 Rails 5.2.3 应用程序。我遇到了 websockets 的性能问题,并且看到我们需要在使用 web sockets 时调整乘客,如此处所示https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_force_max_concurrent_requests_per_process
我看到在使用 nginx 时,我们需要对特定端点进行以下更改以接受无限并发连接
server {
listen 80;
server_name www.example.com;
root /webapps/my_app/public;
passenger_enabled on;
# Use default concurrency for the app. But for the endpoint
# /special_websocket_endpoint, force a different concurrency.
location /special_websocket_endpoint {
passenger_app_group_name foo_websocket;
passenger_force_max_concurrent_requests_per_process 0;
}
}
我如何在使用独立乘客时指定这样的配置。对此的任何帮助都会非常有帮助。谢谢。
【问题讨论】:
标签: websocket ruby-on-rails-5 passenger