lambda函数和api网关如何处理灾难恢复? [英] How lambda function and api gateway handle disaster recovery?

查看:119
本文介绍了lambda函数和api网关如何处理灾难恢复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,Lambda是由AWS处理的无服务器服务.

As we all know Lambda is a serverless service that is handled by AWS.

我当前的流量是:

client(API)->API网关->λ

client(API) -> API gateway -> lambda

我想知道当我的lambda所在的区域下降时会发生什么?还想知道当API网关区域出现故障时会发生什么情况.

I am wondering what happens when the region where my lambda is present goes down? also wondering what happens when the API gateway region goes down.

应如何处理?是由AWS处理的,因为它是无服务器的,还是我应该亲自处理呢?

How it should be handled? is it handled by AWS as it is serverless OR should I handle it myself, how would that be?

推荐答案

API网关和lambda都是区域服务. AWS文档为lambda编写:

Both API gateway and lambda are regional services. AWS docs write for lambda:

Lambda在多个可用区中运行您的功能,以确保在单个区域中发生服务中断时该功能可用于处理事件.

Lambda runs your function in multiple Availability Zones to ensure that it is available to process events in case of a service interruption in a single zone.

因此,如果整个区域出现故障,您的功能也会随之下降.因此,您必须积极主动,并使其备份以及应用程序的其他部分准备好在其他地区运行.

Thus, in case an entire region goes down, your functions will go down with it. So you have to be pro-active and have their backups, as well the other parts of your application, ready to run in other region.

就API网关而言,您可以在不同区域中运行多个副本 API网关,并使用Route53(这是全局服务)来管理对它们的访问量,具体说明如下:

In terms of API gateway, you can run multiple copies of your API gateway in different regions and use Route53 (which is global service) to manage traffic to them as explained in:

它是由AWS处理的,因为它是无服务器的,还是我应该亲自处理呢?

is it handled by AWS as it is serverless OR should I handle it myself, how would that be?

因此,最终,您的责任为您的lambda函数和api网关设计自己的灾难恢复策略.

So ultimately, its your responsibility to design your own disaster recovery strategies for your lambda functions and api gateway.

这篇关于lambda函数和api网关如何处理灾难恢复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆