Google 云 运行 随机增加请求
Google Cloud Run randomly spiking requests
我已经通过云 运行 部署了两个 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"
}
现在对发生的事情一头雾水。任何建议都有帮助!!
知道了!结果是用户保持浏览器选项卡打开的几个打开的 WebSocket 连接。
经验教训!
我已经通过云 运行 部署了两个 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"
}
现在对发生的事情一头雾水。任何建议都有帮助!!
知道了!结果是用户保持浏览器选项卡打开的几个打开的 WebSocket 连接。
经验教训!