Skip to content

fcvm-fleet: the wall's broadcast on Amazon IVS - #714

Draft
ejc3 wants to merge 1 commit into
mainfrom
fcvm-fleet-broadcast
Draft

ejc3 wants to merge 1 commit into
mainfrom
fcvm-fleet-broadcast

Conversation

@ejc3

@ejc3 ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The fcvm wall's broadcast on Amazon IVS (ejc3/fcvm docs/fleet/ARCHITECTURE.md, "Broadcast mode"; design ejc3/fcvm#1384).

Past the measured direct-mode capacity (500 viewers, ejc3/fcvm fleet/renderer/README.md "Viewers per renderer"), viewers watch one composite of the whole wall that the coordinator encodes and pushes to an IVS low-latency channel. Measured: 1.79 s glass to glass at the median, 0.21 s to the first frame.

Changes

fcvm-fleet-broadcast.tf (gate local.fcvm_fleet_broadcast):

  • aws_ivs_channel fcvm-fleet-stage-broadcast in us-east-1 (IVS is not in us-east-2): STANDARD (IVS transcodes the 720p input into 720p/480p/360p/160p), LOW latency, authorized (private). Its default stream key via data.aws_ivs_stream_key.
  • A P-384 playback key pair (tls_private_key + aws_ivs_playback_key_pair). The coordinator signs an ES384 playback token per /live connection; /live is behind Cloudflare Access on staging, so only Access-authenticated viewers get one, and the playback URL alone is refused.
  • Secret fcvm-fleet/broadcast (us-east-2): ingest_url (with the stream key), playback_url, channel_arn, playback_key_pem, the JSON ejc3/fcvm's BroadcastSecret reads. Only the coordinator's task role may read it (new inline policy).

fcvm-fleet.tf:

  • Coordinator command: --broadcast-listen 127.0.0.1:20310 --broadcast-secret fcvm-fleet/broadcast --direct-capacity 500 while the gate is on.
  • Coordinator task: 2 vCPU / 4 GB with the broadcast (the 720p composite took 1.69 cores measured), 0.5 / 1 GB otherwise.
  • dualStackIPv6 account setting on with the broadcast as well as aggregated mode: the broadcast reads every tile at its IPv6 name.

Cost

$2.00 an hour while the channel is live (the coordinator pushes only while the fleet is awake; it sleeps after 10 minutes with no viewer), $0.072 per viewer-hour at 720p and $0.036 at 480p (North America, first 10,000 hours a month), and about $43 a month for the larger task.

Order

Needs a coordinator image with --broadcast-listen and --direct-capacity (ejc3/fcvm#1385 and #1387); an image without them refuses the arguments and the task does not start. Marked ready only once those are deployed to staging.

ejc3/fcvm docs/fleet/ARCHITECTURE.md "Broadcast mode": past the measured direct
capacity (500 viewers), viewers watch one composite of the whole wall that the
coordinator pushes to an IVS low-latency channel (1.79 s glass to glass measured,
ejc3/fcvm#1384).

fcvm-fleet-broadcast.tf (gate local.fcvm_fleet_broadcast):
- aws_ivs_channel fcvm-fleet-stage-broadcast in us-east-1: STANDARD, LOW latency,
  authorized (private); its default stream key read with data.aws_ivs_stream_key.
- A P-384 playback key pair (tls_private_key + aws_ivs_playback_key_pair).
- Secret fcvm-fleet/broadcast (us-east-2): ingest URL with the stream key,
  playback URL, channel ARN, playback private key (PKCS#8), the JSON ejc3/fcvm's
  BroadcastSecret reads.
- The coordinator task role may read that secret.

fcvm-fleet.tf:
- The coordinator runs with --broadcast-listen, --broadcast-secret and
  --direct-capacity 500 while the gate is on.
- Its task grows to 2 vCPU / 4 GB (the 720p composite took 1.69 cores measured).
- The dualStackIPv6 account setting is on with the broadcast too: the broadcast
  reads every tile at its IPv6 name.

Cost: $2.00 an hour while the channel is live (the fleet is awake), $0.072 per
viewer-hour at 720p, about $43 a month for the larger task.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant