doh
doh

Reputation: 21

Google Cloud Run randomly spiking requests

I've deployed two Hasura instances via Cloud Run, but have been getting randomly spiking requests periodically for one of the containers. As far as I can see, this is not being initiated by any of our frontends, and the spikes look irregular. Weirdly enough, this issue is only happening on one of our instances.

Getting the following messages for each request:

#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"
}

Drawing a blank right now as to what's going on. Any advice is helpful!!

Upvotes: 1

Views: 182

Answers (1)

doh
doh

Reputation: 21

Got it! Turns out it was a few open WebSocket connections from users keeping their browser tab open.

Lesson learned!

Upvotes: 1

Related Questions