You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srs/trunk
Winlin 2e4014ae1c
Proxy: Support proxy server for SRS. v7.0.16 (#4158)
Please note that the proxy server is a new architecture or the next
version of the Origin Cluster, which allows the publication of multiple
streams. The SRS origin cluster consists of a group of origin servers
designed to handle a large number of streams.

```text
                         +-----------------------+
                     +---+ SRS Proxy(Deployment) +------+---------------------+
+-----------------+  |   +-----------+-----------+      +                     +
| LB(K8s Service) +--+               +(Redis/MESH)      + SRS Origin Servers  +
+-----------------+  |   +-----------+-----------+      +    (Deployment)     +
                     +---+ SRS Proxy(Deployment) +------+---------------------+
                         +-----------------------+
```

The new origin cluster is designed as a collection of proxy servers. For
more information, see [Discussion
#3634](https://github.com/ossrs/srs/discussions/3634). If you prefer to
use the old origin cluster, please switch to a version before SRS 6.0.

A proxy server can be used for a set of origin servers, which are
isolated and dedicated origin servers. The main improvement in the new
architecture is to store the state for origin servers in the proxy
server, rather than using MESH to communicate between origin servers.
With a proxy server, you can deploy origin servers as stateless servers,
such as in a Kubernetes (K8s) deployment.

Now that the proxy server is a stateful server, it uses Redis to store
the states. For faster development, we use Go to develop the proxy
server, instead of C/C++. Therefore, the proxy server itself is also
stateless, with all states stored in the Redis server or cluster. This
makes the new origin cluster architecture very powerful and robust.

The proxy server is also an architecture designed to solve multiple
process bottlenecks. You can run hundreds of SRS origin servers with one
proxy server on the same machine. This solution can utilize multi-core
machines, such as servers with 128 CPUs. Thus, we can keep SRS
single-threaded and very simple. See
https://github.com/ossrs/srs/discussions/3665#discussioncomment-6474441
for details.

```text
                                       +--------------------+
                               +-------+ SRS Origin Server  +
                               +       +--------------------+
                               +
+-----------------------+      +       +--------------------+
+ SRS Proxy(Deployment) +------+-------+ SRS Origin Server  +
+-----------------------+      +       +--------------------+
                               +
                               +       +--------------------+
                               +-------+ SRS Origin Server  +
                                       +--------------------+
```

Keep in mind that the proxy server for the Origin Cluster is designed to
handle many streams. To address the issue of many viewers, we will
enhance the Edge Cluster to support more protocols.

```text
+------------------+                                               +--------------------+
+ SRS Edge Server  +--+                                    +-------+ SRS Origin Server  +
+------------------+  +                                    +       +--------------------+
                      +                                    +
+------------------+  +     +-----------------------+      +       +--------------------+
+ SRS Edge Server  +--+-----+ SRS Proxy(Deployment) +------+-------+ SRS Origin Server  +
+------------------+  +     +-----------------------+      +       +--------------------+
                      +                                    +
+------------------+  +                                    +       +--------------------+
+ SRS Edge Server  +--+                                    +-------+ SRS Origin Server  +
+------------------+                                               +--------------------+
```

With the new Origin Cluster and Edge Cluster, you have a media system
capable of supporting a large number of streams and viewers. For
example, you can publish 10,000 streams, each with 100,000 viewers.

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
5 months ago
..
3rdparty ASAN: Support coroutine context switching and stack tracing (#4153) 5 months ago
auto Fix crash when quiting. v6.0.151 v7.0.10 (#4157) 5 months ago
conf Proxy: Support proxy server for SRS. v7.0.16 (#4158) 5 months ago
doc Proxy: Support proxy server for SRS. v7.0.16 (#4158) 5 months ago
etc/init.d Squash: Fix bugs 3 years ago
gdb The identifier "ShowCouroutines" needs to be modified to "ShowCoroutines" in order to rectify the typographical error. v6.0.63 (#3703) 2 years ago
ide/srs_clion UniquePtr: Support SrsUniquePtr to replace SrsAutoFree. v6.0.136 (#4109) 7 months ago
modules Moduels: Refine the description 4 years ago
packaging Windows: Refine cygwin pipeline (#3260) 2 years ago
research ASAN: Support coroutine context switching and stack tracing (#4153) 5 months ago
scripts UniquePtr: Support SrsUniquePtr to replace SrsAutoFree. v6.0.136 (#4109) 7 months ago
src Proxy: Support proxy server for SRS. v7.0.16 (#4158) 5 months ago
usr/lib/systemd/system Squash: Support RPM. Fix bugs. 3 years ago
.gitignore For #2136: API: Cleanup no active streams for statistics. v5.0.42 2 years ago
AUTHORS.md Update contributors. 1 year ago
AUTHORS.txt Update AUTHORS 3 years ago
Dockerfile.builds Use new cache image name. v6.0.86 (#3815) 1 year ago
Dockerfile.cov Asan: Refine asan warning message for macOS. 2 years ago
Dockerfile.pkg Merge branch v5.0.103 into develop 2 years ago
Dockerfile.test Fix opus delay options, use ffmpeg-opus in docker test. v6.0.102 (#3883) 1 year ago
configure ASAN: Support coroutine context switching and stack tracing (#4153) 5 months ago