Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS fault backup, HLS hot standby #351

Closed
winlinvip opened this issue May 16, 2015 · 1 comment
Closed

HLS fault backup, HLS hot standby #351

winlinvip opened this issue May 16, 2015 · 1 comment
Assignees
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT. Won't fix We won't fix it.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented May 16, 2015

https://github.com/winlinvip/simple-rtmp-server/issues/351

TRANS_BY_GPT3

@winlinvip winlinvip added Feature It's a new feature. wontfix labels May 16, 2015
@winlinvip winlinvip added this to the srs 2.0 release milestone May 16, 2015
@winlinvip
Copy link
Member Author

winlinvip commented Sep 15, 2015

I have already implemented this on the periphery and found that the cost of implementing it on the server is too high and not suitable.

In fact, Sun Wukong's solution can still be improved by removing the dependency on storage:

  1. Two servers can cut similar HLS streams, and each SRS adds a GO server as a frontend web server for hot backup.
  2. Use GO to write this frontend web server and hook the on_hls event of SRS, which can back up all the streams pushed up.
  3. Each GO server, upon receiving the on_hls event, stores the local SRS's ts slices in the local directory.
  4. Each GO server stores the ts slices of the hot backup GO server in the remote directory.
  5. The two GO servers use a voting algorithm to elect a master, which stores the data in the main directory for service provision.
    In other words, at any given time, only local or remote is available because main is a replica of either local or remote.
    winlinvip@dbcd7d8
    Added a script to check if two HLS streams are hot backups.

Checking if two HLS streams are hot backups:

./research/hls/check_hls_backup.sh \
http://ossrs.net:1984/hls/live/livestream/live.m3u8 \
http://ossrs.net:1996/hls/live/livestream/live.m3u8

The following two HLS streams are hot backups, generated by two SRS instances:

./research/hls/check_hls_backup.sh \
 http://ossrs.net:1984/hls/live/livestream/live.m3u8 \
http://ossrs.net:1996/hls/live/livestream/live.m3u8

However, these two streams themselves are not hot backups (they become hot backups after synchronization):

./research/hls/check_hls_backup.sh \
 http://ossrs.net:1984/hls_local/live/livestream/live.m3u8 \
http://ossrs.net:1996/hls_local/live/livestream/live.m3u8

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Aug 26, 2021
@winlinvip winlinvip added the Won't fix We won't fix it. label Aug 26, 2021
@winlinvip winlinvip changed the title HLS fault backup,HLS热备 HLS fault backup, HLS hot standby Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT. Won't fix We won't fix it.
Projects
None yet
Development

No branches or pull requests

1 participant