跳到正文
hackernews100(tabernet.es)· mmcclure·· 1 天前品質評分47

Tabernetes:把瀏覽器分頁變成 Kubernetes 節點

Tabernetes: A Kubernetes cluster whose nodes are browser tabs

重點導讀

一般的 Kubernetes 節點要靠電腦或伺服器提供;Tabernetes 則讓開著網頁的分頁也能加入叢集。

  • 加入時,分頁會下載約 5 MB 的內容,在裡面啟動 Linux,等 Kubernetes 派來工作後,就用這個分頁的 CPU 和記憶體執行程式。
  • 像是把 hello 這個 Pod 指定給分頁執行,其他 Pod 則留在叢集自己的機器上。
  • 分頁一關,節點就消失,Kubernetes 會把 Pod 移到別的節點繼續執行。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

tabernetes

Open the page and your phone is a node. The scheduler sends it a pod, and the pod's program runs on a Linux kernel booted in the tab. Close the tab and the node is gone, and Kubernetes starts the pod on someone else's.

A QR code for the page that makes a browser a node

Scan to become a node, or use the browser you are reading this in.

Join the cluster

Joining downloads about 5 MB and runs a small Linux guest in the tab, on one core, until you close the tab.

0

nodes now

0

pods running in tabs

0

countries

-

median boot

-

cluster age

0

hours of tabs lent

0

pods moved off a closed tab

0

carried between tabs and the machine

Topology

The control plane in the middle, a node for each tab, and each Service on the way to the pods behind it. A node is filled when its pod is running. An orange dot is a request you sent, on its way to the pod that answered, and a green one is a tile of the picture on its way to the node that rendered it.

Boot time

How long a tab takes to start its pod: from the tab being handed the pod to the pod's program running, which is the page loading, the kernel booting and the image being mounted. The last 0 starts.

    No pod has started yet.

    Happening now

      Nothing yet. A tab that joins shows up here.

      The fleet

      What the nodes are, by what their browsers say.

        The nodes

        Node Device Browser Near Pod Boot Carried Age

        No tab is a node right now. Yours can be the first.

        How it works

        1. A tab joins. The join page holds a socket open to an agent beside the API server, and the agent registers a Node for the tab.
        2. The scheduler sends a pod. The agent starts the pod's container with tabc, a container runtime whose containers run in browser tabs.
        3. The tab boots Linux. A kernel compiled to WebAssembly runs the pod's program on the tab's CPU and memory. The pod's files and its address stay on the cluster's machine.

        A pod asks for a tab in one line

        The control plane is an ordinary Kubernetes, and a pod is an ordinary pod. The marked line is the only one that is new: the scheduler puts a pod that has it on a tab, and every other pod on the cluster's own machine.

        apiVersion: v1
        kind: Pod
        metadata:
          name: hello
        spec:
          runtimeClassName: tab
          containers:
            - name: hello
              image: alpine
              command: ["sh", "-c", "echo hello from $(uname -m) in a tab; sleep 3600"]
        來源: hackernews100 (tabernet.es)
        開啟原文

        讀者討論

        理性交流 · 即時討論