관리 메뉴

IT & Life

[해외] Azure의 새로운 기능 : 내구성 상태 본문

IT 관련 정보

[해외] Azure의 새로운 기능 : 내구성 상태

미운앙마 2017. 11. 15. 01:34

https://www.infoworld.com/article/3237105/application-development/whats-new-in-azure-functions-durable-states.html

 

 

Azure의 새로운 서버리스 상태 기능은 이벤트와 액션을 관리하는 대안적인 방법을 제공합니다

New serverless state capabilities in Azure Functions offer an alternative way of managing events and actions

 

Microsoft는 이전에 상태를 알 수 없는 Microsoft의 서버리스 컴퓨팅 플랫폼 인 Azure Functions 에 주 개념을 도입했습니다 . 상태를 추가하면 개발자가 Azure 함수를 활용할 수있는 새로운 방법을 제공합니다. 

Microsoft has brought the notions of states to the formerly stateless Azure Functions, Microsoft’s serverless computing platform. The addition of states gives developers exciting new ways to take advantage of Azure Functions. 

 

언뜻보기에 Azure Functions는 Amazon의 AWS Lambda와 비슷합니다. 둘 다 비슷한 이벤트 위주 프로그래밍 모델을 가지고 있지만 Azure의 기능은 Azure의 PaaS 제품의 핵심 기능으로 자체 색상을 보여주기 시작했습니다. 이는 Azure 기능을 메시징 기반 프로그래밍 플랫폼의 중심에 놓기로 한 Microsoft의 결정의 결과이며, Service Fabric과 게시 및 가입 이벤트 그리드를 포함하는 도구 제품군의 일부입니다.

At first glance, Azure Functions is comparable to Amazon’s AWS Lambda. They both have similar event-driven programming models, but now Azure Functions is starting to show its own colors as a core feature of Azure’s PaaS offering. That’s partly the result of Microsoft’s decision to put Azure Functions at the center of a messaging-driven programming platform, part of a suite of tools that include Service Fabric and the publish-and-subscribe Event Grid.

 


Azure 함수에서 serverless에 상태 추가하기

Adding state to serverless in Azure Functions

 

Azure 함수의 최신 업데이트는 흥미 롭습니다. 그 이유는 무 상태의 상태에서 상태를 추가하기 때문입니다. 표준 기능이 하나의 입력에서 데이터를 가져 와서 처리하고 적절한 작업을 처리하는 소프트웨어 전환으로 가장 잘 생각되는 경우 새로운 내구성 기능 은 Microsoft가 "오케스트레이터 기능"이라고 부르는 기능입니다. 단일 스위치 대신 내구성이 뛰어납니다 함수는 일련의 함수를 하나의 긴 트랜잭션으로 래핑하고, 작업을 관리하기 위해 워크 플로를 구축하고, 함수를 일시 중지하여 대기를 처리합니다.

The latest update to Azure Functions is an interesting because it takes something that was at its heart stateless and adds state. Where a standard function is best thought of as a software switch—taking data from one input, processing it, and then handling appropriate actions—the new durable functions are what Microsoft is calling “orchestrator functions.” Instead of a single switch, a durable function takes a series of functions and wraps them as a single, long transaction, building in workflow to manage actions, and handling waits by pausing the function.

 

Azure 함수의 장점 중 하나는 사용하는 계산에 대해서만 지불하는 초당 청구 모델입니다. 이 모델은 내구성있는 기능을 수행하며 워크 플로가 실행될 때 비용이 청구됩니다. 입력 대기 중 일시 중지 된 경우 요금이 부과되지 않습니다. 일시 중지되면 외부 상태로 유지되므로 호스트 프로세스가 다시 요청되거나 해당 기능을 호스팅하는 VM이 ​​재부팅되면 함수가 실행되어 계속 수행 될 수 있습니다.

One of the advantages of Azure Functions is its per-second billing model, where you pay only for the compute you use. That model carries into durable functions, where you’re charged when a workflow is running. If it’s paused waiting for an input, there’s no charge. And when it’s paused, it holds its state externally, so if the host process is reclaimed or the VM that’s hosting the function is rebooted, your function can pick up and carry on.

 

 

Azure 함수의 외부 상태 유지

Keeping Azure Functions states external

 

Azure Functions와 같은 상태 비 저장 플랫폼에서 상태를 구축하는 데 필요한 해결 방법을 피하는 것이 중요하기 때문에 상태를 외부화하는 방법은 매우 중요합니다. 함수를 호출하면 인스턴스화 된 부분을 제어 할 수 없으며 사용할 수있는 기간을 제어 할 수 없습니다. 기본 플랫폼이 함수를 호스트하는 데 사용 된 컨테이너를 다시 확보해야하는 경우, 그 컨테이너는 손실됩니다. 그러나 상태를 저장하는 경우 대체 함수는 데이터를 저장하는 동일한 함수 인 것처럼 데이터를 집어 들고 계속 수행 할 수 있습니다.

Having a way to externalize state is very important, because it’s central to avoiding the workarounds needed to build state in a stateless platform like Azure Functions. When you call into a function, you have no control over where it’s instantiated, and you have no control over how long it’ll be available. If the underlying platform needs to reclaim the container used to host a function, it’s lost. But if it stores state, a replacement function can pick it up and carry on as if it was the same function that stored the data.

 

후드에서 내구성있는 기능은 친숙한 Azure 개념을 기반으로 스토리지 큐 및 테이블 스토리지에 상태를 저장합니다. 그러나 이는 시작일 뿐이며 성능 향상에 중점을두고 미래의 대안적인 스토리지 옵션을 기대할 수 있습니다.

Under the hood, durable functions build on familiar Azure concepts, storing state in storage queues and in table storage. But that’s only the start, and you can expect to see alternative storage options in the future, with a focus on improved performance.

 

내구성있는 함수는 동기 작업을 처리하는 것 이상을 수행 할 수 있습니다. 함수를 함께 연결하는 데이 함수를 사용하는 경우 전체 함수 워크 플로는 다른 함수가 완료 될 때까지 하나의 함수를 트리거 할 때까지 기다릴 수 있습니다. 이것은 닷넷 어플리케이션에서 자바 스크립트 콜백을 연결하거나 async / await를 사용하는 것과 같습니다. 그러나 워크 플로는 간단한 작업 체인을 처리하는 것 이상을 수행합니다. 조건부, 루프 및 오류 처리를 제공하는 모든 제어 흐름 연산자를 사용할 수도 있습니다.

Durable functions can do more than handle synchronous operations. If you’re using them to chain functions together, your overall function workflow can wait to trigger one function until after another has completed. It’s much like chaining JavaScript callbacks or using async/await in .Net applications. But workflows do more than handle simple chains of actions; they can also use any control flow operators, offering conditionals, loops, and even error handling.

 

 

Azure 함수의 새로운 서버리스 패턴

New serverless patterns in Azure Functions

 

체인 기능은 하나의 옵션에 불과합니다. 재미있는 부분은 Microsoft에서 팬 아웃 / 팬인 패턴 이라고 부르는 것을 사용하는 것 입니다. 그것들은 내구성있는 함수를 사용하여 병렬 연산을 마샬링하고, 트리거를 사용하고, 여러 함수를 실행하고, 결과를 처리하고 최종 동작을 트리거하기 전에 모든 함수가 끝날 때까지 기다리는 방법입니다.

Chaining functions is only one option. Where things start to get interesting is using what Microsoft calls fan-out/fan-in patterns. They’re a way of using durable functions to marshal parallel operations, taking in a trigger and launching several functions and waiting for them all to finish before processing the results and using them to trigger a final action.


부모 내구성 기능의 작업 목록은 팬 아웃 작업의 일부로 시작된 모든 기능을 추적하여 모두 완료 될 때 트리거합니다. 팬 아웃 동작은 자식 프로세스가 실행되는 동안 검사 점, 상태 기록 및 부모 내구성 기능 일시 중지입니다.

A task list in the parent durable function tracks all the functions launched as part of the fan-out operation, triggering when they’re all complete. The fan-out actions are checkpoints, recording state and pausing the parent durable function while its child processes run.

 

내구성있는 함수를 자세히 살펴보면 Service Fabric에서 사용되는 신뢰할 수있는 액터와 매우 유사하다는 것을 알 수 있습니다. 이러한 유사성은 상태 기반 싱글 톤과 같이 제공되는 좀 더 복잡한 디자인 패턴을 보면 매우 분명합니다. 여기서는 기본 내구 함수가 무한 루프로 작동하여 여러 입력을 가져 와서 처리합니다. 처리 된 데이터는 다른 코드에서 액세스 할 수있는 상태 정보로 기록됩니다. 상태 저장 싱글 톤 패턴을 구현하는 내구성있는 함수는 적절한 입력을받은 경우에만 실행되고 이후 트리거를 기다리는 동안 일시 중지됩니다.

When you look at durable functions in detail, you can see that they’re very similar to the reliable actors used in Service Fabric. That similarity is very clear when you look at the some of the more complex design patterns offered, like the stateful singleton. Here, a basic durable function operates as an infinite loop, taking and processing multiple inputs. Processed data is written out as state information, which can be accessed by other code. The durable function that implements the stateful singleton pattern runs only when it receives an appropriate input, and it pauses while it waits for further triggers.

 

 

Azure 기능에서 serverless를 세계에 연결하기

Connecting serverless in Azure Functions to the world

 

Azure 플랫폼 서비스의 변경 사항을 기반으로 작업을 트리거하는 데 사용하는 경우 Azure 함수의 원래 상태없는 릴리스가 의미가 있습니다. 그러나 자신의 코드 및 제 3 자 코드 및 외부 서비스 및 장치에서 트리거를 사용하여 작업 할 때 응답 대기 시간을 제어 할 수 없기 때문에 어떤 형태의 상태와 워크 플로 아이디어가 필요합니다. . 데이터가 언제 도착할 지 잘 모르는 상황에서 인터넷의 이벤트 (IoT) 하드웨어에서 이벤트를 기다리고있을 때 더욱 중요해진다.

The original stateless release of Azure Functions made sense if you were using to trigger actions based on changes in Azure platform services. But when you’re using them to work with triggers from your own code and third-party code, and with external services and devices, you need some form of state and some idea of workflow because you won’t have any control over response latency. That becomes even more important when you’re waiting for events from internet of things (IoT) hardware, when you have no idea when that data will arrive.

 

대부분의 코드는 워크 플로 코드이므로 서브 루틴과 서비스 간의 상호 작용을 자동화합니다. 내구성있는 함수를 사용하면 서버리스 코드를 동일한 방식으로 처리 할 수 ​​있으므로 이벤트 발생시 소싱 및 싱킹을 수행하고 필요에 따라 이벤트를 집계 및 연결 할 수 있습니다. 분산 프로그래밍 문제는 모두 해결할 수는 없지만 복잡성을 줄이고 클라우드 애플리케이션에 비용을 절약 할 수 있습니다.

Much of your code is likely workflow code, automating interactions between subroutines and services. Durable functions lets you treat serverless code in the same way, sourcing and sinking events as they occur, aggregating and chaining them as required. They may not solve all your distributed programming problems, but they go along way to reducing complexity—and possibly even saving you money in your cloud applications.

 

 

Azure 기능은 더 이상 클라우드에 없습니다.

Azure Functions are no longer just in the cloud

 

Microsoft는 Azure 기능을 휴대용으로 만들고 있습니다. Azure 함수 런타임은 자체 컨테이너에서 사용할 수 있으므로 내부 네트워크 또는 다른 공용 클라우드에 서버리스 응용 프로그램을 빌드하고 배포 할 수 있습니다. Azure의 관리 도구의 이점을 얻지는 못하지만 서버가 필요없는 코드를 원하는 위치에서 실행할 수있는 유용한 방법입니다. 또한 하이브리드 클라우드 배치를 위해 Azure Stack에서 Azure Functions를 지원합니다.

처음에는 휴대용 Azure 함수 런타임에서 내구성있는 함수를 볼 수 없습니다. Microsoft는 나중에 지원할 계획입니다. 현재로서는 내구성이 뛰어난 기능을 위해 Azure 서비스가 필요합니다.

Microsoft is making Azure Functions portable. An Azure Functions runtime is available for your own containers, so you can build and deploy serverless applications on your internal network or another public cloud. You won’t get the benefit of Azure’s management tools, but it’s a useful way of ensuring your serverless code runs anywhere you want. There’s also Azure Functions support on Azure Stack, for hybrid cloud deployments.

Initially, though, you won’t see durable functions in the portable Azure Functions runtime; Microsoft plans to support them later. For now, durable functions require Azure services to operate.

 

서버리스 컴퓨팅 모델은 효과적인 워크 플로우 엔진을 필요로하며, 내구성있는 기능을 프로그램 가능한 워크 플로우로 처리함으로써 훨씬 복잡한 오케스트레이션을 구축하는 데 도움이되는 도구를 얻을 수 있습니다. 최근에 강화 된 Kubernetes 기반 Windows 컨테이너 서비스 는 물론 CosmosDB 및 Service Fabric과 같은 다른 Azure 서비스와 함께 Azure에서 실행되는 분산 응용 프로그램을 제공하는 열쇠입니다. 글로벌 퍼블릭 클라우드의 경우 이러한 상태 저장 기능이 반드시 필요합니다.

Serverless computing models need an effective workflow engine, and by treating durable functions as a programmable workflow, you gain a tool that can help build much more complex orchestrations. Used with other Azure services, like CosmosDB and Service Fabric, as well as with the recently enhanced Kubernetes-based Windows container services, it’s the key to delivering distributed applications running across Azure. For a global public cloud, these stateful functions are going to be indispensable.

Comments