【问题标题】:How to manually manage keys in Memorystore Redis in GAE?如何在 GAE 中手动管理 Memorystore Redis 中的密钥?
【发布时间】:2020-06-20 10:27:57
【问题描述】:

我已经在 Google App Engine 中使用我的 Nodejs 设置了 Memorystore Redis。我想知道如何访问我的 redis 实例以便手动管理(如del)密钥?

this doc 从 Compute Engine 访问,但从 GAE 呢?

【问题讨论】:

  • App Engine Standard 没有供您通过 telnet 或其他工具手动操作内存存储的接口(终端、SSH 等)。 App Engine Flexible 确实支持 SSH,就像 Compute Eingine 一样。
  • 我明白了。谢谢!
  • 仅供参考:您可以使用 SDK,请参阅 cloud.google.com/memorystore/docs/redis/libraries
  • 谢谢@filip26。 SDK 可以让我在我的 memorystore redis 实例上执行 Redis 命令吗?

标签: google-app-engine google-cloud-platform google-cloud-memorystore


【解决方案1】:

有一个关于如何将 App Engine 连接到 Cloud Memorystore 的类似教程,您可以找到 here

基本上,这些步骤包括设置Serverless VPC Access,然后使用标准nodejs Redis 库与您的Memorystore 实例进行交互。除此之外,无需遵循更多特定于 Cloud 的步骤,只需编写代码并享受乐趣。

另外,正如 filip26 指出的那样,您还拥有 Google Cloud Memorystore 库,它旨在管理 Memorystore 实例和配置,就像您通过 Cloud SDK 或控制台所做的那样。但是,在添加或删除条目的意义上,它们不用于与数据库交互。

请注意,Memorystore 中不允许使用本地 Redis 服务器中可用的某些 Redis 命令,您可以找到有关这些限制的更多信息here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多