How can I see how full my API Gateway cache is?

1

I have a 0.5GB cache setup on API Gateway, but have no idea if this is enough. There doesn't seem to be any metrics showing if it's full or not and how full it is. How can I know if this is enough or I need to upgrade?

1回答
1

You can see how full your API Gateway cache is by using CloudWatch Metrics.

  • Open the CloudWatch console in the AWS Management Console.
  • In the navigation pane, choose "Metrics".
  • In the "Custom Namespaces" section, choose "AWS/ApiGateway"
  • In the "Dimensions" section, select your API Gateway deployment.
  • Scroll down the metrics list, to find the "CacheHitCount" and "CacheMissCount" metrics under the "Cache" category. The "CacheHitCount" metric represents the number of requests served from the cache and the "CacheMissCount" metric represents the number of requests that were not served from the cache. To know how full your cache is you can calculate the hit rate by dividing the "CacheHitCount" metric by the sum of the "CacheHitCount" and "CacheMissCount" metrics. The resulting percentage tells you what percentage of requests were served from the cache.
Amgad
回答済み 1年前
  • That's not how full my cache is though, that's just how many requests were served from it. Here's an example:

    • 100 unique people hit 100 different URL's on API Gateway, each of those hits is cached and the cache is now 100% full.
    • 100 different people hit 100 different URL's on API Gateway.

    The "CacheHitCount" will be 0, so by your calculations the cache is at 0%, but it's actually full.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ