2022-09-13: Websocket error rate spike briefly exceeded SLO
Incident Roles
The DRI for this incident is the incident issue assignee, see roles and responsibilities.
Roles when the incident was declared:
Current Status
During deploys of the websockets
service, when some old pods are stopped, the service experiences a burst of connect
and subscribe
requests that temporarily spike CPU utilization on the remaining pods. This brief period of extra utilization appears to sometimes cause a similarly brief spike in error rate.
Context and corrective action
Last Friday (2022-09-09), as a mitigation for incident #7716 (closed), to unblock deploys at a time when GCP had run out of C2
machines, we had temporarily increased our deploy strategy's maxUnavailable
specification from 0 pods to 2 pods. Since then, it looks like at least the websockets
service cannot handle losing capacity during a deploy, because stopping pods immediately causes a fairly large burst of requests from clients reconnecting. (Unlike most of our services, websockets clients maintain long-lived connections, so stopping a pod will tend to cause a request burst.)
To avoid having deploys cause error rate spikes, gitlab-com/gl-infra/k8s-workloads/gitlab-com!2115 (merged) sets maxUnavailable
back to 0, so that deploys add pods before destroying them. This way, a deploy does not reduce capacity immediately before it indirectly triggers a surge of requests.
Summary for CMOC notice / Exec summary:
- Customer Impact: Some elements of the web UI that rely on websockets may temporarily stop updating until websockets reconnects. Depending on timing, this may have little or no practical impact on most users. Reconnect attempts should generally succeed, and in the worst case, the user can recover by refreshing their browser tab.
- Service Impact: ServiceWebsockets
- Impact Duration: 2022-09-13 14:57 - 15:03 UTC (6 minutes)
- Root cause: RootCauseSaturation
Timeline
Recent Events (available internally only):
- Deployments
- Feature Flag Changes
- Infrastructure Configurations
- GCP Events (e.g. host failure)
- Gitlab.com Latest Updates
All times UTC.
2022-09-13
-
15:09
- @msmiley declares incident in Slack.
Create related issues
Use the following links to create related issues to this incident if additional work needs to be completed after it is resolved:
Takeaways
- ...
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
-
gitlab-com/gl-infra/k8s-workloads/gitlab-com!2115 (merged) - To avoid having deploys cause error rate spikes, this MR sets the deploy strategy's
maxUnavailable
limit back from2
to0
, so that deploys add pods before destroying them. This way, the deploy does not reduce capacity immediately before it indirectly triggers a surge in requests.
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
Incident Review
-
Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary -
If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section -
Fill out relevant sections below or link to the meeting review notes that cover these topics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- ...
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- ...
-
How many customers were affected?
- ...
-
If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
- ...
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- ...
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
What went well?
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)