All Products
Search
Document Center

Intelligent Media Services:Distribute content across regions

Last Updated:Feb 27, 2026

Set up two MediaConnect flows to relay a live stream from one Alibaba Cloud region to another over the Alibaba Cloud backbone network.

How it works

Cross-region distribution requires two flows: one in the region closest to the source (Flow A) and one in the region closest to the receivers (Flow B). The stream ingest client pushes content to Flow A, which forwards it to Flow B through the Alibaba Cloud network. Receivers then pull the stream from Flow B for playback.

The following diagram uses Singapore-to-Germany as an example.

Architecture diagram: Stream ingest client pushes to Flow A (Singapore), which sends the stream to Flow B (Germany/Frankfurt) through the Alibaba Cloud network. Receivers pull the stream from Flow B.

To distribute a single source stream to multiple regions, create additional destination flows and connect each one to Flow A using the same approach.

Prerequisites

Before you begin, make sure that you have:

Relay an RTMP stream from Singapore to Germany (Frankfurt)

This example walks through relaying an RTMP stream in four steps:

  1. Create Flow A in the source region with a source and an output.

  2. Create Flow B in the destination region and link it to Flow A.

  3. Start both flows.

  4. Push the stream to Flow A and pull it from Flow B.

Step 1: Create Flow A (source region)

  1. Log on to the IMS console. In the left-side navigation pane, choose MediaConnect > Flows. Click Create Flow. Create Flow button Example configuration: Click OK. On the flow details page, note the Flow ID. You need it when configuring Flow B. Flow details page showing the Flow ID

    • Flow Name: FlowA

    • Region: Singapore

  2. Add a source. On the flow details page, click Add Source Stream. Add Source Stream button In the Add Source panel, configure the following parameters:

    ParameterExample valueDescription
    Source NameFlowAInputA descriptive name for the source
    ProtocolRTMP-PUSHThe ingest client pushes the stream to this flow
    Max Bitrate1000000 bpsMaximum allowed bitrate
    IP Address Whitelist(Optional)IP addresses allowed to send content. If left blank, no access control is enforced
  3. Add an output. Click the Outputs tab, then click Add Output. Add Output on the Outputs tab Example configuration: Click OK. Note the output name (FlowAOutput). You need it when configuring Flow B.

    • Output Name: FlowAOutput

    • Protocol: RTMP-PULL

Step 2: Create Flow B (destination region)

  1. In the IMS console, click Create Flow. Create Flow B Example configuration: Click OK.

    • Flow Name: FlowB

    • Region: Germany (Frankfurt)

  2. Add a source and link it to Flow A. On the flow details page, click Add Source Stream. Add Source Stream for Flow B In the Add Source panel, configure the following parameters:

    ParameterExample valueDescription
    Source NameFlowBInputA descriptive name for the source
    ProtocolFlowThe inter-flow protocol that connects Flow B to Flow A
    Flow ID(Flow A's ID)The Flow ID noted in Step 1
    Output NameFlowAOutputThe output name noted in Step 1
    Note

    If adding the source fails, verify that the Flow ID and Output Name match the values from Flow A.

  3. Add an output. Click the Outputs tab, then click Add Output. Add Output for Flow B Example configuration:

    ParameterExample valueDescription
    Output NameFlowBOutputA descriptive name for the output
    ProtocolRTMP-PULLReceivers pull the stream from this output
    IP Address Whitelist(Optional)IP addresses allowed to pull content. If left blank, no access control is enforced

Step 3: Start both flows

On the flow details page of each flow, click Start on the Status panel. Both Flow A and Flow B must be running before the stream can be relayed.

Start button on the Status panel

For details about flow states, see Flow status.

Step 4: Ingest and play the stream

Push the stream to Flow A

After configuring the source for Flow A, the system generates a Source URL. Push the stream to this URL from the ingest client.

Source URL on the flow details page

Pull the stream from Flow B

After configuring the output for Flow B, the system generates an output URL. Receivers pull the stream from this URL for playback.

Output URL on the flow details page

Supported protocol combinations

MediaConnect supports RTMP and SRT protocols. The protocols of the source and destination flows must be compatible. The output protocol options available in the console depend on the source protocol: SRT output options are only available when the source also uses SRT.

  • Flow A input: This example uses RTMP-PUSH. Alternatively, use RTMP-PULL to have Flow A pull the stream from a specified source URL. For details, see Add a source to a flow.

  • Flow B output: This example uses RTMP-PULL. Alternatively, use RTMP-PUSH to have Flow B push the stream to a specified output URL. For details, see Add an output to a flow.

  • Flow A output: When the Flow B input protocol is set to Flow, the Flow A output protocol must be RTMP-PULL.

The following table lists all supported protocol combinations for cross-region transmission.

Flow A inputFlow A outputFlow B inputFlow B output
RTMP-PUSH / RTMP-PULLRTMP-PULLFlowRTMP-PUSH / RTMP-PULL
RTMP-PUSH / RTMP-PULLFlowRTMP-PUSHRTMP-PUSH / RTMP-PULL
SRT-Listener / SRT-CallerSRT-ListenerFlowSRT-Listener / SRT-Caller
SRT-Listener / SRT-CallerFlowSRT-ListenerSRT-Listener / SRT-Caller