Repository navigation
Conversation
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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(gatelocal.fcvm_fleet_broadcast):aws_ivs_channelfcvm-fleet-stage-broadcastin 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 viadata.aws_ivs_stream_key.tls_private_key+aws_ivs_playback_key_pair). The coordinator signs an ES384 playback token per/liveconnection;/liveis behind Cloudflare Access on staging, so only Access-authenticated viewers get one, and the playback URL alone is refused.fcvm-fleet/broadcast(us-east-2):ingest_url(with the stream key),playback_url,channel_arn,playback_key_pem, the JSON ejc3/fcvm'sBroadcastSecretreads. Only the coordinator's task role may read it (new inline policy).fcvm-fleet.tf:--broadcast-listen 127.0.0.1:20310 --broadcast-secret fcvm-fleet/broadcast --direct-capacity 500while the gate is on.dualStackIPv6account 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-listenand--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.