// Generated by orrery. Edit the diagram spec and re-render instead of editing this file.
import { type SVGProps, useId } from "react";

export default function VideoStreamingSystemDesign(props: SVGProps<SVGSVGElement>) {
  const uid = useId().replace(/[^A-Za-z0-9_-]/g, "");
  return (
    <svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" width="877" height="983" viewBox="0 0 877 983" role="img" aria-labelledby={`${uid}-sdw-title ${uid}-sdw-desc`} fontFamily="Inter, 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif" {...props}>
      <title id={`${uid}-sdw-title`}>
        Video streaming system design
      </title>
      <desc id={`${uid}-sdw-desc`}>
        Video streaming system design. 14 components. Connections: Clients to API gateway (HTTPS API); API gateway to Upload service (get upload URL); Upload service to Metadata service (create video); Clients to Raw uploads (PUT pre-signed URL); Raw uploads to Transcode jobs (upload complete); Raw uploads to Transcoding workers (source file); Transcode jobs to Transcoding workers (poll); Transcoding workers to Processed storage (HLS/DASH renditions); Transcoding workers to Metadata service (ready); API gateway to Metadata service (watch page); Metadata service to Redis (lookup); Metadata service to Metadata DB (on miss); Metadata service to Search (index); API gateway to Search (query); API gateway to Recommendations (home feed); API gateway to view-events (produce); view-events to Recommendations (watch history); Clients to CDN edge (HLS segments); CDN edge to Processed storage (cache miss).
      </desc>
      <defs>
        <symbol id={`${uid}-s1`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M13 9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1z" />
            <path d="M18 8V5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h9m3-9h2" />
          </g>
        </symbol>
        <symbol id={`${uid}-s2`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 13h5m3 3V8h3a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2h-3m8-5v8M9 16v-5.5a2.5 2.5 0 0 0-5 0V16" />
        </symbol>
        <symbol id={`${uid}-s3`} viewBox="0 0 256 413" overflow="visible">
          <path fill="#1a1919" d="M87.932 36.714c-4.55-4.571-10.896-7.394-17.951-7.394c-7.029 0-13.326 2.823-17.822 7.394h-.13c-4.535 4.55-7.358 10.9-7.358 17.93c0 7.055 2.823 13.352 7.359 17.875l.129.102c4.496 4.55 10.793 7.346 17.822 7.346c7.055 0 13.402-2.797 17.951-7.346L88 72.52c4.558-4.523 7.354-10.82 7.354-17.876c0-7.029-2.796-13.38-7.354-17.929zm-17.951 346.64a25.5 25.5 0 0 0 17.951-7.368l.067-.134c4.558-4.487 7.354-10.838 7.354-17.817c0-7.056-2.796-13.38-7.354-17.952h-.067c-4.55-4.625-10.896-7.42-17.951-7.42c-7.029 0-13.326 2.795-17.822 7.42h-.13c-4.535 4.572-7.358 10.896-7.358 17.952c0 6.98 2.823 13.33 7.359 17.817l.129.134a25.15 25.15 0 0 0 17.822 7.368m137.972-76.72c6.275-1.646 11.957-5.673 15.423-11.761l.468-.887c3.082-5.776 3.644-12.44 1.998-18.344c-1.659-6.324-5.735-11.917-11.81-15.418l-.352-.237c-5.918-3.242-12.662-3.947-18.857-2.274c-6.297 1.57-11.952 5.775-15.4 11.814c-3.492 5.981-4.223 12.88-2.55 19.231c1.725 6.244 5.761 11.89 11.796 15.418h.04c6.047 3.475 12.898 4.104 19.244 2.458M95.97 180.387c-6.654-6.637-15.824-10.794-25.988-10.794c-10.124 0-19.272 4.157-25.912 10.794c-6.61 6.614-10.686 15.76-10.686 25.898c0 10.165 4.076 19.339 10.686 26.029c6.64 6.582 15.788 10.712 25.912 10.712c10.164 0 19.334-4.13 25.988-10.712c6.623-6.69 10.7-15.864 10.7-26.029c0-10.137-4.077-19.284-10.7-25.898m-14.61-43.164c14.726 2.426 27.976 9.482 38.087 19.673h.08a72 72 0 0 1 4.625 5.147l25.284-14.629c-3.399-10.271-3.555-21.01-.826-31.072c3.609-13.487 12.35-25.56 25.453-33.137l.433-.26c12.96-7.345 27.696-8.861 41-5.253a54.52 54.52 0 0 1 33.186 25.48v.026c7.529 13.015 9.059 27.96 5.464 41.393c-3.581 13.478-12.363 25.631-25.453 33.155l-3.452 2.043h-.352c-12.109 5.771-25.426 6.663-37.655 3.447c-10.044-2.667-19.258-8.26-26.47-16.23l-25.243 14.585a69.7 69.7 0 0 1 4.509 24.694a70.7 70.7 0 0 1-4.51 24.824l25.244 14.53c7.212-8.072 16.426-13.562 26.47-16.229c13.469-3.684 28.405-2.114 41.46 5.49l.833.393v.053c12.613 7.627 21.078 19.441 24.619 32.767a54.43 54.43 0 0 1-5.464 41.344l-.454.914l-.054-.08c-7.564 12.573-19.48 21.091-32.638 24.695c-13.5 3.554-28.432 2.038-41.473-5.46v-.106c-13.103-7.578-21.844-19.678-25.453-33.133c-2.729-10.035-2.573-20.779.826-31.046l-25.284-14.584c-1.45 1.78-3.02 3.452-4.625 5.071l-.08.076c-10.11 10.142-23.361 17.198-38.088 19.548v29.217c10.494 2.194 19.9 7.448 27.273 14.816l.035.08c9.88 9.825 15.994 23.517 15.994 38.57c0 15.003-6.115 28.61-15.994 38.489l-.035.156c-9.946 9.879-23.598 15.993-38.65 15.993c-14.972 0-28.642-6.114-38.56-15.993h-.036v-.156c-9.893-9.879-16.02-23.486-16.02-38.49a54.26 54.26 0 0 1 16.02-38.569v-.08h.035c7.36-7.368 16.779-12.622 27.246-14.816v-29.217c-14.74-2.35-27.95-9.406-38.048-19.548l-.107-.076C7.89 243.053 0 225.624 0 206.285c0-19.284 7.89-36.714 20.511-49.389h.107c10.098-10.19 23.308-17.247 38.048-19.673v-29.087A55.34 55.34 0 0 1 31.42 93.293h-.035v-.08c-9.893-9.928-16.02-23.518-16.02-38.57c0-14.976 6.127-28.695 16.02-38.574l.035-.049C41.34 6.115 55.01 0 69.98 0c15.053 0 28.705 6.115 38.65 16.02v.05h.036c9.88 9.878 15.994 23.597 15.994 38.573c0 15.052-6.115 28.642-15.994 38.57l-.035.08c-7.373 7.319-16.779 12.568-27.273 14.843zm142.017-19.392l-.21-.312c-3.492-5.882-9.058-9.803-15.213-11.502c-6.346-1.672-13.197-.963-19.284 2.511h.04c-6.075 3.448-10.138 9.094-11.837 15.418a25.3 25.3 0 0 0 2.551 19.231l.116.16a25 25 0 0 0 15.284 11.57a24.83 24.83 0 0 0 19.21-2.48l.325-.156c5.905-3.528 9.838-9.094 11.484-15.208c1.673-6.298 1.008-13.197-2.466-19.232" />
        </symbol>
        <symbol id={`${uid}-s4`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M15.5 13a3.5 3.5 0 0 0-3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1-7 0v-1.8" />
            <path d="M17.5 16a3.5 3.5 0 0 0 0-7H17" />
            <path d="M19 9.3V6.5a3.5 3.5 0 0 0-7 0M6.5 16a3.5 3.5 0 0 1 0-7H7" />
            <path d="M5 9.3V6.5a3.5 3.5 0 0 1 7 0v10" />
          </g>
        </symbol>
        <symbol id={`${uid}-s5`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M3 7a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm0 8a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm4-7v.01M7 16v.01M11 8h6m-6 8h6" />
        </symbol>
        <symbol id={`${uid}-s6`} viewBox="0 0 256 288" overflow="visible">
          <path fill="#343741" d="M0 143.82c0 12.44 1.744 24.441 4.71 35.956h175.067c19.856 0 35.955-16.1 35.955-35.956c0-19.865-16.1-35.955-35.955-35.955H4.71C1.744 119.371 0 131.38 0 143.82" />
          <path fill="#fec514" d="M242.013 68.863c5.025-4.629 9.7-9.6 13.987-14.93C229.636 21.079 189.213 0 143.82 0C87 0 38.101 33.052 14.775 80.9h196.559c11.38 0 22.319-4.324 30.678-12.037" />
          <path fill="#00bfb3" d="M211.334 206.742H14.774c23.336 47.839 72.226 80.9 129.045 80.9c45.393 0 85.816-21.088 112.18-53.933a136.6 136.6 0 0 0-13.987-14.94c-8.36-7.721-19.299-12.027-30.678-12.027" />
        </symbol>
        <symbol id={`${uid}-s7`} viewBox="0 0 256 220" overflow="visible">
          <path fill="#912626" d="M245.97 168.943c-13.662 7.121-84.434 36.22-99.501 44.075s-23.437 7.78-35.34 2.09c-11.902-5.69-87.216-36.112-100.783-42.597C3.566 169.271 0 166.535 0 163.951v-25.876s98.05-21.345 113.879-27.024c15.828-5.679 21.32-5.884 34.79-.95c13.472 4.936 94.018 19.468 107.331 24.344l-.006 25.51c.002 2.558-3.07 5.364-10.024 8.988" />
          <path fill="#c6302b" d="M245.965 143.22c-13.661 7.118-84.431 36.218-99.498 44.072c-15.066 7.857-23.436 7.78-35.338 2.09c-11.903-5.686-87.214-36.113-100.78-42.594c-13.566-6.485-13.85-10.948-.524-16.166c13.326-5.22 88.224-34.605 104.055-40.284c15.828-5.677 21.319-5.884 34.789-.948c13.471 4.934 83.819 32.935 97.13 37.81c13.316 4.881 13.827 8.9.166 16.02" />
          <path fill="#912626" d="M245.97 127.074c-13.662 7.122-84.434 36.22-99.501 44.078c-15.067 7.853-23.437 7.777-35.34 2.087c-11.903-5.687-87.216-36.112-100.783-42.597C3.566 127.402 0 124.67 0 122.085V96.206s98.05-21.344 113.879-27.023c15.828-5.679 21.32-5.885 34.79-.95C162.142 73.168 242.688 87.697 256 92.574l-.006 25.513c.002 2.557-3.07 5.363-10.024 8.987" />
          <path fill="#c6302b" d="M245.965 101.351c-13.661 7.12-84.431 36.218-99.498 44.075c-15.066 7.854-23.436 7.777-35.338 2.087c-11.903-5.686-87.214-36.112-100.78-42.594c-13.566-6.483-13.85-10.947-.524-16.167C23.151 83.535 98.05 54.148 113.88 48.47c15.828-5.678 21.319-5.884 34.789-.949c13.471 4.934 83.819 32.933 97.13 37.81c13.316 4.88 13.827 8.9.166 16.02" />
          <path fill="#912626" d="M245.97 83.653c-13.662 7.12-84.434 36.22-99.501 44.078c-15.067 7.854-23.437 7.777-35.34 2.087c-11.903-5.687-87.216-36.113-100.783-42.595C3.566 83.98 0 81.247 0 78.665v-25.88s98.05-21.343 113.879-27.021c15.828-5.68 21.32-5.884 34.79-.95C162.142 29.749 242.688 44.278 256 49.155l-.006 25.512c.002 2.555-3.07 5.361-10.024 8.986" />
          <path fill="#c6302b" d="M245.965 57.93c-13.661 7.12-84.431 36.22-99.498 44.074c-15.066 7.854-23.436 7.777-35.338 2.09C99.227 98.404 23.915 67.98 10.35 61.497S-3.5 50.55 9.825 45.331C23.151 40.113 98.05 10.73 113.88 5.05c15.828-5.679 21.319-5.883 34.789-.948s83.819 32.934 97.13 37.811c13.316 4.876 13.827 8.897.166 16.017" />
          <path fill="#fff" d="m159.283 32.757l-22.01 2.285l-4.927 11.856l-7.958-13.23l-25.415-2.284l18.964-6.839l-5.69-10.498l17.755 6.944l16.738-5.48l-4.524 10.855zm-28.251 57.518L89.955 73.238l58.86-9.035zm-56.95-50.928c17.375 0 31.46 5.46 31.46 12.194c0 6.736-14.085 12.195-31.46 12.195s-31.46-5.46-31.46-12.195c0-6.734 14.085-12.194 31.46-12.194" />
          <path fill="#621b1c" d="m185.295 35.998l34.836 13.766l-34.806 13.753z" />
          <path fill="#9a2928" d="m146.755 51.243l38.54-15.245l.03 27.519l-3.779 1.478z" />
        </symbol>
        <symbol id={`${uid}-s8`} viewBox="0 0 256 233" overflow="visible">
          <path fill="#f16938" d="M0 0h51.35l25.818 47.193l10.363 19.092l20.064 37.037l11.55 21.306l8.706 16.003l6.374-11.731l18.688-34.412l16.799-30.412l9.139-16.557L204.866 0H256l-22.951 41.618l-29.088 52.762l-26.626 48.111l-50.341 91.192l46.368-84.004l-46.376 84.01l-24.255-44.436l-21.452-39.573l-4.165-7.678l-25.647-47.079l-2.412-4.408l-4.536-8.271z" />
          <path d="m44.525 82.237l-.006.007z" />
          <path fill="#284e64" d="m144.694 142.654l.024-.124l8.204-48.032zm59.255-48.269l-26.625 48.118l-50.332 91.176l.002.004l50.341-91.192l26.626-48.111l29.088-52.762zm.91-94.379l-8.547 15.618l8.55-15.618zM44.525 82.237l32.64-35.029zm6.948 12.686L87.52 66.29zm0 0l-2.418-4.408l2.412 4.408l25.647 47.079l4.165 7.678l-4.168-7.688z" />
          <path fill="#284e64" d="m60.466 78.223l16.7-31.015L87.518 66.29l20.076 37.032L87.53 66.285L77.168 47.193L51.358.006h-.005l25.812 47.202zm75.13 76.647l.118.218l4.833 8.885zm34.116-90.794l-16.8 30.412l-18.687 34.412l18.697-34.402z" />
          <path fill="#f16827" d="m102.731 189.253l24.255 44.436l13.349-68.627z" />
          <path fill="#f48029" d="m140.547 163.973l-4.833-8.885l-16.569-30.46l-16.414 64.625l37.604-24.191z" />
          <path fill="#f89a2e" d="m77.111 141.992l4.168 7.688l21.452 39.573l16.414-64.625z" />
          <path fill="#f16827" d="m77.111 141.992l42.034-17.364l-11.55-21.306L87.519 66.29z" />
          <path fill="#f89921" d="m144.694 142.654l8.228-48.156l-18.697 34.402l-6.374 11.731l7.745 14.239l4.951 9.103z" />
          <path fill="#f89a2e" d="m51.473 94.923l25.638 47.069L87.519 66.29z" />
          <path fill="#f48029" d="m177.324 142.503l26.625-48.118l-59.231 48.145z" />
          <path fill="#f4ae5c" d="m77.165 47.208l-16.7 31.015l-8.992 16.7L87.52 66.29zm67.553 95.322l34.133-95.011l-9.139 16.557l-16.79 30.422z" />
          <path fill="#cd4e27" d="m51.473 94.923l8.993-16.7l16.699-31.015l-32.64 35.029l-.006.007l4.536 8.271z" />
          <path fill="#f16938" d="m203.949 94.385l-25.098-46.866l-34.133 95.01zM44.525 82.237l32.64-35.029L51.353.006L51.35 0l-6.831 82.244z" />
          <path fill="#f89a2e" d="m203.949 94.385l.917-94.379V0l-.003.006l-8.55 15.618l-17.462 31.895zM51.349 0H0l44.519 82.244z" />
          <path fill="#cd4e27" d="M204.866 0v.006l-.917 94.379l29.1-52.767L256 0zm-60.148 142.53l-.024.124l-4.147 21.319l-.212 1.089l-13.349 68.627l.006-.01l50.332-91.176z" />
        </symbol>
        <symbol id={`${uid}-s9`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M4 7a8 4 0 1 0 16 0A8 4 0 1 0 4 7" />
            <path d="M4 7c0 .664.088 1.324.263 1.965L7 19c.5 1.5 2.239 2 5 2s4.5-.5 5-2q.5-1.5 2.737-10.035A7.5 7.5 0 0 0 20 7" />
          </g>
        </symbol>
        <symbol id={`${uid}-s10`} viewBox="0 0 24 24" overflow="visible">
          <path fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4L4 8l8 4l8-4zm-8 8l8 4l8-4M4 16l8 4l8-4" />
        </symbol>
        <symbol id={`${uid}-s11`} viewBox="0 0 256 244" overflow="visible">
          <defs>
            <radialGradient id={`${uid}-s11-_SVGK18OLd2s`} cx="19.932%" cy="18.852%" r="50.648%" fx="19.932%" fy="18.852%" gradientTransform="matrix(.96523 0 0 1 .007 0)">
              <stop offset="0%" stopColor="#fff" />
              <stop offset="100%" stopColor="#007808" />
            </radialGradient>
          </defs>
          <path fill="#0b4819" d="M2.132 51.591V21.189l20.409 7.031v28.283zm16.457 124.986V63.534l19.508 4.127v105.06z" />
          <path fill="#105c80" d="m114.003 21.139l-50.135 57.5v24.469l74.357-83.843L256 10.148L82.762 190.718l23.062 1.214L231.652 63.233v121.639l-13.978 13.14l35.451 1.915v33.666l-111.203-8.613l56.687-54.992v-27.102l-81.043 80.208l-97.04-7.503L176.18 48.195l-25.616 1.385L38.097 172.721V67.661L48.75 55.084l-26.209 1.419V28.22z" />
          <path fill="#0b4819" d="m18.589 63.534l11.283-13.582l18.878 5.132l-10.653 12.577z" />
          <path fill="#084010" d="m45.917 75.272l17.951 3.367v24.469l-17.951-1.469z" />
          <path fill="#0c541e" d="m66.012 196.142l16.75-5.424l23.062 1.214l-15.218 5.629z" />
          <path fill="#1a5c34" d="m99.344 12.96l14.659 8.179l-50.135 57.5l-17.951-3.367z" />
          <path fill="#0b4819" d="m45.917 101.639l79.356-90.873l12.952 8.499l-74.357 83.843z" />
          <path fill="#1a5c34" d="m138.513 43.53l12.051 6.05L38.097 172.721l-19.508 3.856z" />
          <path fill="#0b4819" d="M0 222.589L166.066 41.902l10.114 6.293L20.526 215.591z" />
          <path fill="#1a5c34" d="m190.263 144.697l8.346-1.811l-81.043 80.208l-14.412 8.229z" />
          <path fill="#0b4819" d="M190.263 174.156v-29.459l8.346-1.811v27.102z" />
          <path fill="#0b4819" d="m129.241 233.526l61.022-59.37l8.346-4.168l-56.687 54.992z" />
          <path fill="#13802d" d="m226.027 190.476l-15.147 14.233l6.794-6.697l13.978-13.14z" />
          <path fill="#0b4819" d="m90.606 197.561l135.421-139.56l5.625 5.232l-125.828 128.699z" />
          <path fill="#084010" d="m226.027 58.001l5.625 5.232v121.639l-5.625 5.604zm23.33 148.982l3.768-7.056v33.666l-3.768 10.106z" />
          <path fill="#1a5c34" d="M252.478 0L256 10.148L82.762 190.718l-16.75 5.424z" />
          <path fill={`url(#${uid}-s11-_SVGK18OLd2s)`} d="M99.344 12.96L45.917 75.272v26.367l79.356-90.873L252.478 0L66.012 196.142l24.594 1.419l135.421-139.56v132.475l-15.147 14.233l38.477 2.274v36.716l-120.116-10.173l61.022-59.37v-29.459l-87.109 86.626L0 222.589L166.066 41.902l-27.553 1.628L18.589 176.577V63.534l11.283-13.582l-27.74 1.639V21.189z" />
        </symbol>
        <symbol id={`${uid}-s12`} viewBox="0 0 24 24" overflow="visible">
          <g fill="none" stroke="#000000" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
            <path d="M20.985 12.52a9 9 0 1 0-7.52 8.36M3.6 9h16.8M3.6 15h10.9" />
            <path d="M11.5 3a17 17 0 0 0 0 18m1-18c2.313 3.706 3.07 7.856 2.27 12M19 16l-2 3h4l-2 3" />
          </g>
        </symbol>
      </defs>
      <rect width="877" height="983" fill="#ffffff" />
      <text fontSize="20" fontWeight="600" fill="#000000">
        <tspan x="28" y="43.78">
          Video streaming system design
        </tspan>
      </text>
      <text fontSize="13" fill="#5f6b7a">
        <tspan x="28" y="66.18">
          Uploads go straight to object storage; workers transcode a bitrate ladder that viewers stream as HLS segments from the CDN
        </tspan>
      </text>
      <g id={`${uid}-e-e1`}>
        <path d="M590.5 128 L281.5 128 Q273.5 128 273.5 136 L273.5 263.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M269 255 L273.5 264 L278 255" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e2`}>
        <path d="M305.5 296 L350.5 296 Q358.5 296 358.5 304 L358.5 431.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M354 423 L358.5 432 L363 423" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e3`}>
        <path d="M345.5 536 L345.5 599.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M341 591 L345.5 600 L350 591" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e4`}>
        <path d="M623 200 L623 262.75" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M617.5 253 L623 264 L628.5 253" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e5`}>
        <path d="M598.5 368 L598.5 453.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M594 445 L598.5 454 L603 445" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e6`}>
        <path d="M612.5 368 L612.5 380 Q612.5 388 620.5 388 L642 388 Q650 388 650 396 L650 616.75" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M644.5 607 L650 618 L655.5 607" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e7`}>
        <path d="M578.75 514 L578.75 617.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M574.25 609 L578.75 618 L583.25 609" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e8`}>
        <path d="M718 652 L730 652 Q738 652 738 660 L738 766.75" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M732.5 757 L738 768 L743.5 757" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e9`}>
        <path d="M515 642 L365.25 642" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M373.5 637.5 L364.5 642 L373.5 646.5" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e10`}>
        <path d="M280.5 368 L280.5 548 Q280.5 556 288.5 556 L323.5 556 Q331.5 556 331.5 564 L331.5 599.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M327 591 L331.5 600 L336 591" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e11`}>
        <path d="M333 704 L333 767.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M328.5 759 L333 768 L337.5 759" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e12`}>
        <path d="M347 704 L347 716 Q347 724 355 724 L507 724 Q515 724 515 732 L515 781.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M510.5 773 L515 782 L519.5 773" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e13`}>
        <path d="M319 704 L319 716 Q319 724 311 724 L96 724 Q88 724 88 732 L88 767.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M83.5 759 L88 768 L92.5 759" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e14`}>
        <path d="M241.5 289 L82 289 Q74 289 74 297 L74 767.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M69.5 759 L74 768 L78.5 759" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e15`}>
        <path d="M266.5 368 L266.5 624 Q266.5 632 258.5 632 L214.25 632" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" />
        <path d="M222.5 627.5 L213.5 632 L222.5 636.5" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e16`}>
        <path d="M241.5 303 L182.5 303 Q174.5 303 174.5 311 L174.5 453.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M170 445 L174.5 454 L179 445" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e17`}>
        <path d="M175 514 L175 599.25" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinejoin="round" strokeDasharray="6 4" />
        <path d="M170.5 591 L175 600 L179.5 591" fill="none" stroke="#545b64" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e18`}>
        <path d="M654.5 128 L744 128 Q752 128 752 136 L752 262.75" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M746.5 253 L752 264 L757.5 253" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-e-e19`}>
        <path d="M752 368 L752 766.75" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinejoin="round" />
        <path d="M746.5 757 L752 768 L757.5 757" fill="none" stroke="#545b64" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
      </g>
      <g id={`${uid}-el-e1`}>
        <rect x="396" y="104" width="72" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="432" y="118.68">
            HTTPS API
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e2`}>
        <rect x="364.5" y="353.5" width="96" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="412.5" y="368.18">
            get upload URL
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e3`}>
        <rect x="351.5" y="557.5" width="80" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="391.5" y="572.18">
            create video
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e4`}>
        <rect x="492" y="221.5" width="125" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="554.5" y="236.18">
            PUT pre-signed URL
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e5`}>
        <rect x="489.5" y="400.5" width="103" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="541" y="415.18">
            upload complete
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e6`}>
        <rect x="656" y="492.5" width="70" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="691" y="507.18">
            source file
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e7`}>
        <rect x="584.75" y="555.5" width="32" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="600.75" y="570.18">
            poll
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e8`}>
        <rect x="604" y="699.5" width="128" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="668" y="714.18">
            HLS/DASH renditions
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e9`}>
        <rect x="418.25" y="618" width="43" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="439.75" y="632.68">
            ready
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e10`}>
        <rect x="286.5" y="381.33" width="46" height="36" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="309.5" y="396.01">
            watch
          </tspan>
          <tspan x="309.5" y="411.01">
            page
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e11`}>
        <rect x="339" y="736.17" width="49" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="363.5" y="750.85">
            lookup
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e12`}>
        <rect x="404" y="700" width="54" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="431" y="714.68">
            on miss
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e13`}>
        <rect x="182.5" y="727" width="42" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="203.5" y="741.68">
            index
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e14`}>
        <rect x="80" y="518" width="44" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="102" y="532.68">
            query
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e15`}>
        <rect x="189.5" y="533.5" width="71" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="225" y="548.18">
            home feed
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e16`}>
        <rect x="180.5" y="368" width="58" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="209.5" y="382.68">
            produce
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e17`}>
        <rect x="83" y="546.5" width="86" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="126" y="561.18">
            watch history
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e18`}>
        <rect x="758" y="185.5" width="91" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="803.5" y="200.18">
            HLS segments
          </tspan>
        </text>
      </g>
      <g id={`${uid}-el-e19`}>
        <rect x="758" y="557.5" width="74" height="21" rx="4" fill="#ffffff" fillOpacity="0.92" />
        <text fontSize="11.5" fill="#000000" textAnchor="middle">
          <tspan x="795" y="572.18">
            cache miss
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-clients`}>
        <use href={`#${uid}-s1`} x="590.5" y="96" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="622.51" y="179.18">
            Clients
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="622.5" y="196.58">
            Creators and viewers
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-gateway`}>
        <use href={`#${uid}-s2`} x="241.5" y="264" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="273.51" y="347.18">
            API gateway
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="273.51" y="364.58">
            Auth, rate limits
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-events`}>
        <g fill="#ffffff" stroke="#8b95a1" strokeWidth="1.25">
          <path d="M103 454 H246 A10 30 0 0 1 246 514 H103 A10 30 0 0 1 103 454 Z" />
          <path d="M246 454 A10 30 0 0 0 246 514" fill="none" />
        </g>
        <use href={`#${uid}-s3`} x="121.32" y="474" width="20" height="20" />
        <text fontSize="13" fontWeight="600" fill="#000000" textAnchor="middle">
          <tspan x="188.51" y="480.23">
            view-events
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="188.5" y="497.63">
            Kafka topic
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-recs`}>
        <use href={`#${uid}-s4`} x="149.5" y="600" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="181.5" y="683.18">
            Recommendations
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="181.51" y="700.58">
            Retrieve, then rank
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-upload`}>
        <use href={`#${uid}-s5`} x="326.5" y="432" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="358.51" y="515.18">
            Upload service
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="358.5" y="532.58">
            Signs upload URLs
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-metadata`}>
        <use href={`#${uid}-s5`} x="300.5" y="600" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="332.5" y="683.18">
            Metadata service
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="332.5" y="700.58">
            Info, manifest URLs
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-search`}>
        <use href={`#${uid}-s6`} x="49" y="768" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="81.01" y="851.18">
            Search
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="81.01" y="868.58">
            Elasticsearch index
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-cache`}>
        <use href={`#${uid}-s7`} x="301" y="768" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="333" y="851.18">
            Redis
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="333" y="868.58">
            Hot metadata
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-db`}>
        <g fill="#ffffff" stroke="#8b95a1" strokeWidth="1.25">
          <path d="M410 790 A105 8 0 0 1 620 790 V850 A105 8 0 0 1 410 850 Z" />
          <path d="M410 790 A105 8 0 0 0 620 790" fill="none" />
        </g>
        <use href={`#${uid}-s8`} x="426.12" y="815" width="20" height="20" />
        <text fontSize="13" fontWeight="600" fill="#000000" textAnchor="middle">
          <tspan x="529" y="821.23">
            Metadata DB
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="529" y="838.63">
            MySQL sharded with Vitess
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-raw`}>
        <use href={`#${uid}-s9`} x="590.5" y="264" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="622.5" y="347.18">
            Raw uploads
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="622.49" y="364.58">
            Object storage
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-jobs`}>
        <g fill="#ffffff" stroke="#8b95a1" strokeWidth="1.25">
          <path d="M460 454 H622 A10 30 0 0 1 622 514 H460 A10 30 0 0 1 460 454 Z" />
          <path d="M622 454 A10 30 0 0 0 622 514" fill="none" />
        </g>
        <use href={`#${uid}-s10`} x="478.28" y="474" width="20" height="20" />
        <text fontSize="13" fontWeight="600" fill="#000000" textAnchor="middle">
          <tspan x="555" y="480.23">
            Transcode jobs
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="555" y="497.63">
            Work queue
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-transcoder`}>
        <g fill="#ffffff" stroke="#8b95a1" strokeWidth="1.25">
          <rect x="523" y="618" width="195" height="60" rx="6" />
          <rect x="519" y="622" width="195" height="60" rx="6" />
          <rect x="515" y="626" width="195" height="60" rx="6" />
        </g>
        <use href={`#${uid}-s11`} x="535.48" y="642" width="20" height="20" />
        <text fontSize="13" fontWeight="600" fill="#000000" textAnchor="middle">
          <tspan x="630.5" y="648.23">
            Transcoding workers
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="630.5" y="665.63">
            Parallel chunk encodes
          </tspan>
        </text>
        <rect x="704.36" y="611" width="23.28" height="16" rx="8" fill="#000000" />
        <text x="716" y="622.5" fontSize="10" fontWeight="600" fill="#ffffff" textAnchor="middle">
          xN
        </text>
      </g>
      <g id={`${uid}-n-processed`}>
        <use href={`#${uid}-s9`} x="713" y="768" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="745" y="851.18">
            Processed storage
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="745" y="868.58">
            CDN origin
          </tspan>
        </text>
      </g>
      <g id={`${uid}-n-cdn`}>
        <use href={`#${uid}-s12`} x="720" y="264" width="64" height="64" />
        <text fontSize="13" fill="#000000" textAnchor="middle">
          <tspan x="752" y="347.18">
            CDN edge
          </tspan>
        </text>
        <text fontSize="11.5" fill="#5f6b7a" textAnchor="middle">
          <tspan x="752.01" y="364.58">
            Caches segments
          </tspan>
        </text>
      </g>
      <g id={`${uid}-legend`}>
        <rect x="646" y="884" width="203" height="71" rx="6" fill="#ffffff" stroke="#c6ccd4" strokeWidth="1" />
        <path d="M656 901.5 H684" fill="none" stroke="#545b64" strokeWidth="1.5" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="692" y="905.68">
            API request or query
          </tspan>
        </text>
        <path d="M656 919.5 H684" fill="none" stroke="#545b64" strokeWidth="2.5" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="692" y="923.68">
            Video bytes
          </tspan>
        </text>
        <path d="M656 937.5 H684" fill="none" stroke="#545b64" strokeWidth="1.5" strokeDasharray="6 4" />
        <text fontSize="11.5" fill="#000000">
          <tspan x="692" y="941.68">
            Asynchronous event or job
          </tspan>
        </text>
      </g>
    </svg>
  );
}
