Skip to content

[production] Enable replica database connection pool load balancing for asynchronous sidekiq

Production Change

Change Summary

Enable replica database connection pool load balancing for asynchronous sidekiq.

We should set environment variable ENABLE_LOAD_BALANCING_FOR_SIDEKIQ to true in order to enable load balancing for Sidekiq.

This environment variable will only enable load balancing. All workers will still default to :always data consistency - the worker is required to use primary!

We already enabled this on staging (gitlab-org/gitlab#325520 (closed)):

Also, the connection pool size has been increased in production to 15 per pgbouncer on the patroni read-only replica cluster participants: #4135 (comment 545162312)

Change Details

  1. Services Impacted - ServiceSidekiq, ServicePatroni, ServicePostgres, ServiceCI Runners, ServiceAPI, ServiceWeb, ServiceGit, ServiceGitLab Rails
  2. Change Technician - @nnelson
  3. Change Criticality - C1
  4. Change Type - changescheduled
  5. Change Reviewer - @ahmadsherif
  6. Due Date - 2021-04-23 1945 utc
  7. Time tracking - 60-120 minutes
  8. Downtime Component - No downtime expected/required

Detailed steps for the change

Pre-Change Steps - steps to be completed before execution of the change

Estimated Time to Complete (mins) - Finished

Change Steps - steps to take to execute the change

Estimated Time to Complete (mins) - 20-100 minutes

Post-Change Steps - steps to take to verify the change

Estimated Time to Complete (mins) - 5 minutes

Rollback

Rollback steps - steps to be taken in the event of a need to rollback this change

Estimated Time to Complete (mins) - 20 minutes

Monitoring

Key metrics to observe

Summary of infrastructure changes

  • Does this change introduce new compute instances?
    • No
  • Does this change re-size any existing compute instances?
    • No
  • Does this change introduce any additional usage of tooling like Elastic Search, CDNs, Cloudflare, etc?
    • No

None

Changes checklist

  • This issue has a criticality label (e.g. C1, C2, C3, C4) and a change-type label (e.g. changeunscheduled, changescheduled) based on the Change Management Criticalities.
  • This issue has the change technician as the assignee.
  • Pre-Change, Change, Post-Change, and Rollback steps and have been filled out and reviewed.
  • Necessary approvals have been completed based on the Change Management Workflow.
  • Change has been tested in staging and results noted in a comment on this issue.
  • A dry-run has been conducted and results noted in a comment on this issue.
  • SRE on-call has been informed prior to change being rolled out. (In #production channel, mention @sre-oncall and this issue and await their acknowledgement.)
  • There are currently no active incidents.
Edited by Nels Nelson