第12章クラウドネイティブアプリケーション開発
LINK TO LEARNING学びを深めるリンク
Learn more about use cases for using a serverless architecture (https://openstax.org/r/76usecasesserv) in three specific application areas.
3つの具体的な応用分野における、サーバーレスアーキテクチャの利用事例(https://openstax.org/r/76usecasesserv)について、さらに学べる。
PaaS and FaaS ComparisonPaaSとFaaSの比較
PaaS provides a platform that allows customers to provision and scale the infrastructure needed as well as develop, run, and manage applications without the complexity of managing the underlying infrastructure required to run the application. FaaS goes a step further in that it provides an environment where developers can focus on running and managing code without having to provision resources or scaling the underlying infrastructure. In summary, both FaaS and PaaS provide an infrastructure managed by the cloud service provider. Both provide scalability options. Both deliver high availability from remote infrastructure managed automatically by the cloud service provider at scale. FaaS/serverless and PaaS, on the surface, appear to be very similar in their implementation and use from a development point of view. In reality, these two cloud deployment services are quite different. Scalability, pricing, start-up time, tooling, and the ability to deploy differ between the two platforms.
英語のヒント
PaaSは、アプリケーションを動かす基盤の管理の複雑さを引き受けずに、必要な基盤を用意して規模を拡張し、アプリケーションを開発、実行、管理できるプラットフォームを顧客へ提供する。FaaSは、資源の準備や基盤の拡張を行わず、コードの実行と管理に集中できる環境を提供する点で、さらに一歩進んでいる。まとめると、FaaSもPaaSも、クラウドサービス事業者が管理する基盤を提供する。どちらも、規模を拡張するための選択肢を提供する。また、クラウドサービス事業者が大規模に自動管理する遠隔の基盤によって、高い可用性を提供する。開発の観点では、FaaS/サーバーレスとPaaSは、表面的には実装も利用方法も非常によく似ている。しかし実際には、この2つのクラウド配置サービスはかなり異なる。拡張性、料金、起動時間、ツール、配置能力に違いがある。
Serverless applications offer true auto-scaling capabilities to customers without any additional configurations. PaaS provides scalability options that are more advantageous compared to deployments on bare metal servers. However, developers still must consider how to construct and scale a PaaS platform. They must forecast resource capacity and configure PaaS-hosted applications to scale up and down based on demand. Serverless cost structure is based on usage, and there are no fixed monthly charges for services. With FaaS, customers pay per event-based invocation of the function only. With PaaS, pricing models differ depending on the PaaS provider, and are generally associated with the use of compute, storage, and network resources costs. This means, for PaaS, costs accrue during idle time. In some cases, serverless can be a more cost-effective option for software deployments.
英語のヒント
サーバーレスアプリケーションでは、追加の設定なしで、実際に自動で規模を調整できる。PaaSにも、ベアメタルサーバーへの配置より有利な、規模の調整方法がある。しかし、開発者は依然として、PaaSプラットフォームをどう構築し、拡張するかを考える必要がある。資源の容量を予測し、需要に応じて拡大・縮小するよう、PaaS上のアプリケーションを設定しなければならない。サーバーレスの費用は利用量に基づき、サービスの固定月額料金はない。FaaSでは、顧客は、イベントによる関数の呼び出し1回ごとに料金を払う。一方PaaSの料金体系は事業者によって異なり、一般に計算、記憶領域、ネットワーク資源の利用費用に結び付く。つまりPaaSでは、待機中にも費用が積み重なる。場合によっては、サーバーレスが、ソフトウェアを配置する、より費用対効果の高い選択肢となる。
FaaS functions execute in response to events, offering rapid start-up times crucial for event-based processing. Conversely, PaaS applications lack event-triggered start-up capabilities and are tolerant of slower start-up times due to their long-lived nature. FaaS abstracts the application layer, allowing developers to focus solely on function code while cloud service providers manage other aspects. This abstraction, however, reduces flexibility, as developers must adhere to provider-specific frameworks and language limitations. PaaS, on the other hand, offers developers greater control over the development environment, including the choice of programming languages and frameworks.
英語のヒント
FaaS関数は、イベントに応じて実行される。イベント駆動型の処理にとって重要な、短い起動時間を提供する。一方、PaaSアプリケーションには、イベントをきっかけに起動する機能はなく、長時間動く性質があるため、起動が遅くても許容できる。FaaSはアプリケーション層を抽象化し、開発者が関数のコードだけに集中できるようにする。ほかの側面はクラウドサービス事業者が管理する。ただし、この抽象化によって柔軟性は下がる。開発者は、事業者固有のフレームワークや、言語の制限に従わなければならないからである。一方PaaSでは、プログラミング言語やフレームワークの選択を含め、開発環境をより大きく制御できる。
There are at least three application areas where it makes sense to go serverless:
サーバーレスの採用が理にかなう応用分野には、少なくとも次の3つがある。
1. Unpredictably fluctuating workloads or frequent low usage ideal for the pricing model of FaaS/ serverless solutions.
英語のヒント
1. 予測できない形で変動するワークロードや、低利用率の期間が頻繁にある処理。FaaS/サーバーレスの料金体系に適している。
2. Processing large, distributed data sources because of the feasibility of auto-scaling of FaaS/serverless environments where computing performance can be dramatically boosted.
2. 大規模な分散データソースの処理。FaaS/サーバーレス環境では、自動で規模を拡張でき、計算性能を大幅に高められるためである。
3. Building highly modular solutions potentially incorporating external services that can also exploit the pricing model of FaaS/serverless solutions.
3. 外部サービスを組み込む可能性もある、高度にモジュール化された仕組みの構築。FaaS/サーバーレスの料金体系も活用できる。
More generally, serverless architecture is ideal for asynchronous, stateless applications that can be started instantaneously. Likewise, serverless is a good fit for use cases that see infrequent, unpredictable surges in demand, that are high-volume, and with parallel workloads. An example of an infrequent in-demand task would be a batch processing of incoming image files. This task can be high-volume if a large batch of images to be processed arrives all at once. Serverless is also a good fit for use cases that involve incoming data stream processing for implementing applications such as chat bots, scheduled tasks, or business logic. Some other common serverless use cases are back-end APIs and web apps, business process automation, serverless websites, and integration across multiple systems.
英語のヒント
より一般的には、サーバーレスアーキテクチャは、即座に起動できる、非同期で状態を保持しないアプリケーションに適している。同様に、頻度は低いが予測できない需要の急増があり、大量の処理が発生し、並列のワークロードを持つ利用事例にも適している。頻度は低いが必要になる作業の例に、届いた画像ファイルのバッチ処理がある。処理すべき画像が一度に大量に届くと、作業量が大きくなる。チャットボット、定期実行する作業、業務ロジックなどを実装するため、入ってくるデータストリームを処理する場合にも適している。ほかの一般的な利用事例には、バックエンドAPIとWebアプリ、業務プロセスの自動化、サーバーレスのWebサイト、複数システム間の統合がある。
CSPs offer several serverless services. Understanding the minute differences between these services can be overwhelming, making it challenging to select the set of services to develop an optimal serverless architecture. It is expected to invest up-front time to get familiar with these services to understand the runtime expectations and resource consumption associated with a prospective serverless solution. It is also challenging to maintain a serverless architecture in a continuous deployment procedure.
英語のヒント
CSPは、複数のサーバーレスサービスを提供している。各サービスの微細な違いを理解するのは、手に余ることもあり、最適なサーバーレスアーキテクチャを開発するためのサービスの組み合わせを選ぶのが難しくなる。候補となるサーバーレスの仕組みの実行時の要件や資源消費を理解するため、最初に時間をかけて各サービスを知る必要がある。また、継続的デプロイメントの手順の中で、サーバーレスアーキテクチャを維持することも難しい。
There are many cloud deployment technology options available to customers, which will continue to evolve. The vast possibilities available provide support for a wide host of services. The sections that follow provide insight into common use cases that are associated with the use of these deployment technology options.
英語のヒント
顧客が利用できるクラウド配置技術には、多くの選択肢があり、今後も進化し続ける。幅広い可能性によって、多種多様なサービスを支えられる。以下では、これらの配置技術の利用に結び付く、一般的な利用事例を見ていく。