時価総額: $2.6677T -0.160%
ボリューム(24時間): $46.0584B -28.290%
  • 時価総額: $2.6677T -0.160%
  • ボリューム(24時間): $46.0584B -28.290%
  • 恐怖と貪欲の指数:
  • 時価総額: $2.6677T -0.160%
暗号
トピック
暗号化
ニュース
暗号造園
動画
トップニュース
暗号
トピック
暗号化
ニュース
暗号造園
動画
bitcoin
bitcoin

$84827.363534 USD

1.04%

ethereum
ethereum

$1582.488947 USD

-0.22%

tether
tether

$0.999953 USD

0.00%

xrp
xrp

$2.053481 USD

-0.91%

bnb
bnb

$589.801258 USD

1.27%

solana
solana

$135.018936 USD

3.25%

usd-coin
usd-coin

$1.000042 USD

0.01%

tron
tron

$0.245539 USD

0.25%

dogecoin
dogecoin

$0.154252 USD

-0.69%

cardano
cardano

$0.612452 USD

-0.19%

unus-sed-leo
unus-sed-leo

$9.233367 USD

-2.14%

chainlink
chainlink

$12.476940 USD

0.69%

avalanche
avalanche

$19.023043 USD

0.27%

stellar
stellar

$0.240851 USD

2.27%

toncoin
toncoin

$2.941934 USD

0.71%

暗号通貨のニュース記事

CloudFlareコンテナの導入:ワーカープラットフォームでネイティブにコンテナを実行する

2025/04/11 22:00

開発者ウィークのほぼ終わりであり、コンテナについて話していません。今まで。

CloudFlareコンテナの導入:ワーカープラットフォームでネイティブにコンテナを実行する

It is almost the end of Developer Week and we haven’t talked about containers: until now. As some of you may know, we’ve been working on a container platform behind the scenes for some time.

開発者ウィークのほぼ終わりであり、コンテナについて話していません。今まで。ご存知のように、私たちはしばらくの間、舞台裏のコンテナプラットフォームに取り組んできました。

In late June, we plan to release Containers in open beta, and today we’ll give you a sneak peek at what makes it unique.

6月下旬に、オープンベータ版でコンテナをリリースする予定です。今日は、それがユニークなものを覗いてみます。

Workers are the simplest way to ship software around the world with little overhead. But sometimes you need to do more. You might want to:

労働者は、頭上がほとんどない世界中にソフトウェアを出荷する最も簡単な方法です。しかし、時にはもっとする必要があります。あなたはしたいかもしれません:

Run user-generated code in any language

任意の言語でユーザー生成コードを実行します

Execute a CLI tool that needs a full Linux environment

完全なLinux環境を必要とするCLIツールを実行する

Use several gigabytes of memory or multiple CPU cores

いくつかのギガバイトのメモリまたは複数のCPUコアを使用します

Port an existing application from AWS, GCP, or Azure without a major rewrite

AWS、GCP、またはAzureからの既存のアプリケーションを大規模な書き直しなしで移植する

Cloudflare Containers let you do all of that while being simple, scalable, and global.

CloudFlareコンテナを使用すると、シンプルでスケーラブルでグローバルでありながら、そのすべてを行うことができます。

Through a deep integration with Workers and an architecture built on Durable Objects, Workers can be your:

労働者との深い統合と耐久性のあるオブジェクトの上に構築された建築を通じて、労働者はあなたのものになることができます。

API Gateway: Letting you control routing, authentication, caching, and rate-limiting before requests reach a container

APIゲートウェイ:リクエストがコンテナに到達する前に、ルーティング、認証、キャッシュ、レート制御を制御できます

Service Mesh: Creating private connections between containers with a programmable routing layer

サービスメッシュ:プログラム可能なルーティングレイヤーでコンテナ間でプライベート接続を作成する

Orchestrator: Allowing you to write custom scheduling, scaling, and health checking logic for your containers

オーケストレーター:コンテナのカスタムスケジューリング、スケーリング、およびヘルスチェックロジックを書くことができます

Instead of having to deploy new services, write custom Kubernetes operators, or wade through control plane configuration to extend the platform, you just write code.

新しいサービスを展開する代わりに、カスタムKubernetesオペレーターを作成するか、プラットフォームを拡張するためにコントロールプレーンの構成を介してWadeを使用する代わりに、コードを作成するだけです。

Let’s see what it looks like.

それがどのように見えるか見てみましょう。

Deploying different application types

さまざまなアプリケーションタイプの展開

A stateful workload: executing AI-generated code

ステートフルなワークロード:AIに生成されたコードの実行

First, let’s take a look at a stateful example.

まず、ステートフルな例を見てみましょう。

Imagine you are building a platform where end-users can run code generated by an LLM. This code is untrusted, so each user needs their own secure sandbox. Additionally, you want users to be able to run multiple requests in sequence, potentially writing to local files or saving in-memory state.

エンドユーザーがLLMによって生成されたコードを実行できるプラットフォームを構築していると想像してください。このコードは信頼されていないため、各ユーザーが独自の安全なサンドボックスを必要としています。さらに、ユーザーが順番に複数のリクエストを実行できるようにし、潜在的にローカルファイルに書き込み、メモリ州の州を保存する可能性があります。

To do this, you need to create a container on-demand for each user session, then route subsequent requests to that container. Here’s how you can accomplish this:

これを行うには、ユーザーセッションごとにコンテナオンデマンドを作成し、その後のリクエストをそのコンテナにルーティングする必要があります。これを達成する方法は次のとおりです。

First, you write some basic Wrangler config, then you route requests to containers via your Worker:

まず、基本的なラングラー構成を書き込み、次にリクエストをワーカーを介してコンテナにルーティングします。

Then, deploy your code with a single command: wrangler deploy. This builds your container image, pushes it to Cloudflare’s registry, readies containers to boot quickly across the globe, and deploys your Worker.

次に、単一のコマンドでコードを展開します:Wrangler Deploy。これにより、コンテナの画像が構築され、CloudFlareのレジストリにプッシュされ、コンテナが世界中をすばやく起動するためのコンテナを準備し、ワーカーを展開します。

That’s it.

それでおしまい。

How does it work?

どのように機能しますか?

Your Worker creates and starts up containers on-demand. Each time you call env.CODE_EXECUTOR.get(id) with a unique ID, it sends requests to a unique container instance. The container will automatically boot on the first fetch, then put itself to sleep after a configurable timeout, in this case 1 minute. You only pay for the time that the container is actively running.

労働者は、容器をオンデマンドで作成して起動します。 env.code_executor.get(ID)を一意のIDで呼び出すたびに、一意のコンテナインスタンスにリクエストを送信します。コンテナは最初のフェッチで自動的に起動し、構成可能なタイムアウト後、この場合は1分後にスリープ状態になります。コンテナが積極的に実行されている時間のみを支払います。

When you request a new container, we boot one in a Cloudflare location near the incoming request. This means that low-latency workloads are well-served no matter the region. Cloudflare takes care of all the pre-warming and caching so you don’t have to think about it.

新しいコンテナをリクエストすると、着信リクエストの近くのCloudFlareの場所で起動します。これは、地域に関係なく、低遅延のワークロードが十分に保護されることを意味します。 CloudFlareは、すべての戦前とキャッシュの世話をしているので、それについて考える必要はありません。

This allows each user to run code in their own secure environment.

これにより、各ユーザーは独自の安全な環境でコードを実行できます。

Stateless and global: FFmpeg everywhere

ステートレスとグローバル:どこでもffmpeg

Stateless and autoscaling applications work equally well on Cloudflare Containers.

StatelessおよびAutoscalingアプリケーションは、CloudFlareコンテナでも同様に機能します。

Imagine you want to run a container that takes a video file and turns it into an animated GIF using FFmpeg. Unlike the previous example, any container can serve any request, but you still don’t want to send bytes across an ocean and back unnecessarily. So, ideally the app can be deployed everywhere.

ビデオファイルを撮影し、FFMPEGを使用してアニメーションGIFに変えるコンテナを実行したいと想像してください。前の例とは異なり、任意のコンテナは任意のリクエストを提供できますが、それでも海洋を横切ってバイトを不必要に送信したくありません。したがって、理想的には、アプリはどこにでも展開できます。

To do this, you declare a container in Wrangler config and turn on autoscaling. This specific configuration ensures that one instance is always running and if CPU usage increases beyond 75% of capacity, additional instances are added:

これを行うには、Wrangler Configでコンテナを宣言し、自動焦点をオンにします。この特定の構成により、1つのインスタンスが常に実行されていることが保証され、CPUの使用量が容量の75%を超えて増加すると、追加のインスタンスが追加されます。

To route requests, you just call env.GIF_MAKER.fetch and requests are automatically sent to the closest container:

リクエストをルーティングするには、env.gif_maker.fetchに電話するだけで、リクエストは最も近いコンテナに自動的に送信されます。

Going beyond the basics

基本を超えて進みます

From the examples above, you can see that getting a basic container service running on Workers just takes a few lines of config and a little Workers code. There’s no need to worry about capacity, artifact registries, regions, or scaling.

上記の例から、労働者で実行されている基本的なコンテナサービスを取得するには、数行の構成と小さな労働者コードが必要であることがわかります。容量、アーティファクトレジストリ、地域、またはスケーリングについて心配する必要はありません。

For more advanced use, we’ve designed Cloudflare Containers to run on top of Durable Objects and work in tandem with Workers. Let’s take a look at the underlying architecture and see some of the advanced use cases it enables.

より高度な用途のために、耐久性のあるオブジェクトの上で実行し、労働者と連携して作業するようにCloudFlareコンテナを設計しました。基礎となるアーキテクチャを見て、それが可能にする高度なユースケースのいくつかを見てみましょう。

Durable Objects as programmable sidecars

プログラム可能なサイドカーとしての耐久性のあるオブジェクト

Routing to containers is enabled using Durable Objects under the hood. In the examples above, the Container class from cloudflare:workers just wraps a container-enabled Durable Object and provides helper methods for common patterns. In the rest of this post, we’ll look at examples using Durable Objects directly, as this should shed light on the platform’s underlying design.

コンテナへのルーティングは、フードの下の耐久性のあるオブジェクトを使用して有効になります。上記の例では、CloudFlare:Workerのコンテナクラスは、コンテナ対応の耐久性のあるオブジェクトを包み、共通パターンのヘルパーメソッドを提供します。この投稿の残りの部分では、耐久性のあるオブジェクトを直接使用した例を見ていきます。これにより、プラットフォームの基礎となるデザインに光が当てられるはずです。

Each Durable Object acts as a programmable sidecar that can proxy requests to the container and manages its lifecycle. This allows you to control and extend your containers in ways that are hard on other

耐久性のある各オブジェクトは、コンテナにリクエストをプロキシでき、ライフサイクルを管理できるプログラム可能なサイドカーとして機能します。これにより、他の人に難しい方法でコンテナを制御および拡張できます

免責事項:info@kdj.com

提供される情報は取引に関するアドバイスではありません。 kdj.com は、この記事で提供される情報に基づいて行われた投資に対して一切の責任を負いません。暗号通貨は変動性が高いため、十分な調査を行った上で慎重に投資することを強くお勧めします。

このウェブサイトで使用されているコンテンツが著作権を侵害していると思われる場合は、直ちに当社 (info@kdj.com) までご連絡ください。速やかに削除させていただきます。

2025年04月19日 に掲載されたその他の記事