Skip to content

Improvement: give video ingestion a list of proxies of its own (VIDEO_INGEST_PROXY_URLS) #5072

Closed

Description

@yannickmonney

Summary

Video ingestion can go through one proxy of its own (VIDEO_INGEST_PROXY_URL) or through the deployment's
outbound proxies (OUTBOUND_PROXY_URLS), which also carry every other request to other websites. It cannot go
through several proxies of its own. This issue asks for VIDEO_INGEST_PROXY_URLS: a list of proxies for video
ingestion only, with the per-video failover that the outbound list already gets.

Why

  • Platforms refuse many proxy addresses. On 2026-10-28, YouTube served metadata through 27 and then 31 of one
    provider's 100 shared data-center addresses, in two passes about 35 minutes apart. It refused 70 and then 66 with
    its bot check, and 12 addresses changed verdict between the passes.
  • The addresses that pass are the expensive ones. Proxies on residential or ISP networks are refused less often
    (docs/en/self-hosted/configuration/video-ingestion.md:48), and providers usually bill them per address or per
    gigabyte. Listed in OUTBOUND_PROXY_URLS, they would also carry the website crawler, the chat assistant's web
    fetch, remote email images and everything sandbox sessions reach on the internet
    (docs/en/self-hosted/configuration/environment-reference.md:227-233).
  • One video proxy has no failover. VIDEO_INGEST_PROXY_URL takes one URL, and an attempt the platform refuses
    through it is not repeated. One refused or expired address stops video ingestion until an operator changes the
    environment and recreates the worker.
  • A report on 2026-10-29: video ingestion still fails through shared data-center proxies. The version, the
    configuration, the log lines and the failure reasons were not captured.

What the code does today

At main 9be5cad:

  • services/platform/backend/core/video_links/ytdlp.ts:194-211 reads VIDEO_INGEST_PROXY_URL as one URL, in any
    scheme yt-dlp speaks (:179-186: http, https, socks4, socks4a, socks5, socks5h). An invalid value is
    ignored with a warning.
  • ytdlp.ts:230-238: that URL wins over the outbound proxies.
  • ytdlp.ts:389-403: YtdlpRoute.blame returns false off the outbound list, so a run through
    VIDEO_INGEST_PROXY_URL is never repeated (test: ytdlp.test.ts:474). moveOn (:408-421) walks only the
    outbound list (nextOutboundProxy, services/platform/lib/net/outbound-proxy.ts:58).
  • ytdlp.ts:282-292: at most five runs per yt-dlp call, and none after the first 90 seconds of a step, so the metadata
    step stays inside the worker watchdog's five minutes. :294-303: per platform, the next video starts on the proxy
    that last served one.
  • ytdlp.ts:305-313: a video keeps one address for all its runs, because YouTube signs media for the address that
    asked and can refuse the download from another.
  • packages/shared/src/net/outbound-proxies.ts:1-23: OUTBOUND_PROXY_URLS accepts http:// entries only, because
    sandbox-egress reads the same list (services/sandbox-egress/outbound-proxies.awk). A malformed entry stops the
    backend from starting (services/platform/backend/env.ts:173).

Where the setting is described or checked:

  • .env.example:919-924. The CLI's generated .env mentions only OUTBOUND_PROXY_URLS
    (tools/cli/src/lib/config/ensure-env.ts:791-793).
  • docs/{en,de,fr}/self-hosted/configuration/video-ingestion.md:30-56 and environment-reference.md:232 and :539.
  • Spec VID-R7 (services/platform/backend/domains/video_links/spec.md:51-59).
  • Manual boxes VID-F6, VID-F9 and VID-B2 (services/platform/tests/manual/suites/video-links.md:65-71, :84-90,
    :98-101), and services/platform/tests/manual/reference/automation/video-links.md:9.
  • Guard services/platform/tests/guards/outbound-proxies.guard.test.ts:182-194: each locale's row for
    VIDEO_INGEST_PROXY_URL must name OUTBOUND_PROXY_URLS.
  • Not examined: how the Kubernetes manifests hand video settings to the worker.

Observed: static residential addresses (2026-10-29)

20 static residential addresses from one provider were each set as VIDEO_INGEST_PROXY_URL and run through the
backend's own runner (ytdlp.ts at main, yt-dlp 2026.10.26, bgutil PO-token provider 1.3.1, player clients
default,mweb,tv_simply). All 20 fetched the metadata, the English captions and the audio of one YouTube video. One
address alone took 86 seconds; with five at a time, each took 166 to 273 seconds. That was one video at one moment,
from one machine.

Constraints

  • A video keeps one address for all its runs, so a list keeps the per-video route, and rotating endpoints stay
    unsuitable.
  • Deployments that set VIDEO_INGEST_PROXY_URL keep working unchanged.
  • Log lines name a proxy by its position and host:port, never by its credentials (outboundProxyEntry,
    services/platform/lib/net/outbound-proxy.ts:95).
  • The metadata step stays inside the watchdog's five minutes.

Options (no preference)

  1. A new VIDEO_INGEST_PROXY_URLS, a list for video only. VIDEO_INGEST_PROXY_URL keeps working as a list of
    one.
  2. Let VIDEO_INGEST_PROXY_URL take a list. No new name, and a single value keeps today's meaning, but the
    singular name would hold several.
  3. A video list in front of the outbound list. Video goes through its own proxies first, and moves on to
    OUTBOUND_PROXY_URLS once all of them have failed it.

Questions

  1. With both VIDEO_INGEST_PROXY_URL and VIDEO_INGEST_PROXY_URLS set: refuse to start, merge them, or let one win?
  2. When every video proxy has failed a video: end with the platform's reason, as the outbound list does, or fall back
    to the outbound proxies or a direct connection?
  3. Schemes: http:// only, like OUTBOUND_PROXY_URLS (one parser, one grammar), or every scheme yt-dlp speaks, like
    VIDEO_INGEST_PROXY_URL (socks5h:// included)?
  4. A malformed entry: stop the backend from starting, like OUTBOUND_PROXY_URLS, or warn and ignore it, like
    VIDEO_INGEST_PROXY_URL?
  5. Rotation state: its own turn and its own memory of proxies set aside, or shared with the outbound rotation? Today a
    proxy that yt-dlp cannot get through is set aside for every request (setOutboundProxyAside,
    services/platform/lib/net/outbound-proxy.ts:107).
  6. Keep five runs per call and the 90-second window for the video list, or scale them with its length?

Related

Activity

  1. added
    agent-ready
    on Nov 1, 2026
  2. added a commit that references this issue on Nov 2, 2026
    dece825
  3. added 2 commits that reference this issue on Nov 2, 2026
    2607d66
    83866e6
  4. tale-code-bot commented on Nov 2, 2026

    @tale-code-bot
    Collaborator

    Landed on release/0.6, the 0.6 feature line, with feature train #5329 as 83866e6 (feat(platform): give video ingestion a list of proxies of its own); it ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Board task: TALE-335.

  5. added 12 commits that reference this issue on Nov 3, 2026
    0bc8990
    bcf1e9c
    57fc381
    c97df4c
    fb4401a
    a15ac1e
    7d16f7c
    0e048d0
    79a68cb
    6f30b8f
    e3e0963
    c7160cf
  6. added a commit that references this issue on Nov 15, 2026
    aea60c8
  7. added a commit that references this issue on Nov 23, 2026
    31c0a64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions