【发布时间】:2021-09-13 22:56:21
【问题描述】:
我已通过 Cloud Run 部署了两个 Hasura 实例,但其中一个容器会定期收到随机峰值请求。据我所知,这不是由我们的任何前端发起的,并且尖峰看起来不规则。奇怪的是,这个问题只发生在我们的一个实例上。
为每个请求获取以下消息:
#1:
{
"insertId": "x",
"jsonPayload": {
"type": "webhook-log",
"detail": {
"http_error": null,
"response": null,
"message": null,
"method": "GET",
"status_code": 200,
"url": "x/auth"
},
"timestamp": "2021-08-26T22:35:40.857+0000",
"level": "info"
},
"resource": {
"type": "cloud_run_revision",
"labels": {
"service_name": "x",
"configuration_name": "x",
"location": "us-central1",
"project_id": "x",
"revision_name": "x"
}
},
"timestamp": "2021-08-26T22:35:41.839935Z",
"labels": {
"instanceId": "x"
},
"logName": "x",
"receiveTimestamp": "2021-08-26T22:35:42.002274277Z"
}
#2:
{
"insertId": "x",
"jsonPayload": {
"timestamp": "2021-08-26T22:35:40.857+0000",
"detail": {
"user_vars": null,
"event": {
"type": "accepted"
},
"connection_info": {
"msg": null,
"token_expiry": null,
"websocket_id": "x"
}
},
"level": "info",
"type": "websocket-log"
},
"resource": {
"type": "cloud_run_revision",
"labels": {
"project_id": "x",
"revision_name": "x",
"service_name": "x",
"configuration_name": "x",
"location": "us-central1"
}
},
"timestamp": "2021-08-26T22:35:41.839957Z",
"labels": {
"instanceId": "x"
},
"logName": "x",
"receiveTimestamp": "2021-08-26T22:35:42.002274277Z"
}
现在对发生的事情保持空白。任何建议都有帮助!
【问题讨论】:
-
欢迎来到 StackOverflow!问题:您提到了 2 个 hasura 实例——它们是用于不同的应用程序并连接到不同的数据库吗? Hasura 是:1.3.x、2.0、Hasura Cloud ?数据库是 postgresql 或 hasura 2.0 中的其他可能的东西?
-
我没有在您的日志跟踪中发现错误...
-
对不起@guillaumeblaquiere -- 已编辑。谢谢@AlexYu!!它们确实适用于不同的应用程序并连接到不同的数据库。我正在使用 Hasura v2.0.1,并使用 postgres
-
您能先说明一下您的每项服务是做什么的吗?这两个服务中的哪一个会遇到随机尖峰请求?
-
现在这两种服务似乎都在发生这种情况。定期收到一堆请求。 3.02/s ATM。
标签: google-cloud-platform google-cloud-run hasura