zalando / zalando/postgres-operator
Spread BACKUP_SCHEDULE
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
We currently deploy around 80 postgres instances with this env var:
- name: BACKUP_SCHEDULE
value: 0 */6 * * *
We notice a cpu/disk/network spike around that time.
It would be nice if there was a feature to spread this "every 6 hours" cron.
For instance, we could have a new env var that would be something like:
BACKUP_SCHEDULE_SPREAD_HOURLY=true
If if true, would put rand(0, 59) in the first cron value.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with spilo/postgres-appliance/scripts/configure_spilo.py around lines 996-998 and trace how BACKUP_SCHEDULE is handled. Define the new environment-variable behavior and verify that enabled instances receive spread backup times while the existing schedule remains unchanged when it is not enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100