将Amazon CloudFront和Amazon API Gateway 一起使用的好处是什么?

0

【以下的问题经过翻译处理】 我想知道在 API Gateway 端点前使用 Amazon CloudFront 分发的好处。就性能而言,我了解到通过 API Gateway(优化边缘 API 端点)可以在最近的 CloudFront 边缘节点终止 API 调用。API 缓存是在节点上缓存内容还是仅在区域性缓存中缓存?是不是使用 CloudFront 与 API Gateway 结合使用的原因之一是缓存?此外,在 API Gateway 前使用 CloudFront 是否有成本优势?

profile picture
EXPERT
asked 6 months ago35 views
1 Answer
0

【以下的回答经过翻译处理】 在API Gateway端点之前部署CloudFront分发的主要原因是为了降低延迟。延迟会因为以下原因而降低:

1.客户端连接到最近的PoP点。从这个点,流量经过AWS的托管网络,与互联网相比可能具有更好的性能。 2. HTTPS握手协商发生在PoP点。这减少了握手所需的往返时间。

部署CloudFront与API Gateway一起的另一个原因是增加了安全能力。目前,AWS Shield Advanced不支持在API Gateways上启用保护,但支持用在CloudFront上。因此,最佳做法是将CloudFront分发放置在API Gateway之前,然后在该分发上启用保护。

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions