1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Heartbeat: Report ports for proxy server. v6.0.156 (#4171)

The heartbeat of SRS is a timer that requests an HTTP URL. We can use
this heartbeat to report the necessary information for registering the
backend server with the proxy server.

```text
SRS(backend) --heartbeat---> Proxy server
```

A proxy server is a specialized load balancer for media servers. It
operates at the application level rather than the TCP level. For more
information about the proxy server, see issue #4158.

Note that we will merge this PR into SRS 5.0+, allowing the use of SRS
5.0+ as the backend server, not limited to SRS 7.0. However, the proxy
server is introduced in SRS 7.0.

It's also possible to implement a registration service, allowing you to
use other media servers as backend servers. For example, if you gather
information about an nginx-rtmp server and register it with the proxy
server, the proxy will forward RTMP streams to nginx-rtmp. The backend
server is not limited to SRS.

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
This commit is contained in:
Winlin 2024-09-09 10:37:41 +08:00 committed by winlin
parent 1bd65f3386
commit b830d688be
8 changed files with 108 additions and 13 deletions

View file

@ -1119,6 +1119,7 @@ public:
virtual std::string get_heartbeat_device_id();
// Whether report with summaries of http api: /api/v1/summaries.
virtual bool get_heartbeat_summaries();
bool get_heartbeat_ports();
// stats section
private:
// Get the stats directive.