Clone
6
v2_CN_Reload
winlin edited this page 2022-01-06 11:57:15 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

HOME > CN > Reload

Reload

SRS配置完全支持Reload即在不中断服务时应用配置的修改。

NotSupportedFeatures

不支持reload的功能包括

  • deamon是否后台启动。
  • modevhost的模式。

daemon选项当然是不支持reload的。

mode选项即决定vhost是源站还是边缘不支持reload。若修改mode之后reload会导致server异常退出由看门狗重启。原因在于

  • 源站和边缘角色切换过于复杂。
  • 一般源站会建立设备组,全部做源站,不会突然变成边缘
  • 上层和源站重启后对最终用户没有影响只是表现会切换上层的卡顿客户端缓冲区设为3秒以上时卡顿都不会出现

一个修改vhost的mode属性的workaround

  • 删除vhost并reload。
  • 确认vhost已经删除了。
  • 添加vhost使用新的mode并reload。

应用场景

Reload主要应用场景

  • 配置快速生效:不用重启服务,修改配置后,只需要killall -1 srs即可生效配置。
  • 不中断服务商用服务器往往时时刻刻都在服务用户如何将一个转码流的码率调低如何禁用某些频道的HLS如何添加和删除频道而且还中断现有用户的服务使用Reload。

使用方法

Reload的方法为killall -1 srs

或者指定发送的SRS进程kill -1 7635

使用启动脚本:/etc/init.d/srs reload

Winlin 2014.2