![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
개발자 주가 거의 끝났고 우리는 컨테이너에 대해 이야기하지 않았습니다. 지금까지.
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.
새로운 서비스를 배포하는 대신 Custom 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:
먼저 기본 Wrangler 구성을 작성한 다음 작업자를 통해 컨테이너로 요청을 라우팅합니다.
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 배포. 컨테이너 이미지를 만들고 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.
작업자는 주문형 컨테이너를 생성하고 시작합니다. 고유 한 ID로 Env.code_Executor.get (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.
무국적 및 자동화 응용 프로그램은 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 구성에서 컨테이너를 선언하고 Autoscaling을 켭니다. 이 특정 구성은 하나의 인스턴스가 항상 실행되도록하고 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의 컨테이너 클래스 : 작업자는 컨테이너 지원 내구성 객체를 감싸고 일반적인 패턴에 대한 도우미 방법을 제공합니다. 이 게시물의 나머지 부분에서는 플랫폼의 기본 디자인에 빛을 비추어야하기 때문에 내구성있는 객체를 직접 사용하는 예를 살펴 보겠습니다.
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 05:45:13
- 로큰롤 명예의 전당 및 박물관의 1 억 5 천만 달러 확장에 대한 건설이 진행 중입니다.
-
-
-
-
-
-
-