Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running switchover before leader shutdown #4024

Open
4 tasks done
dooman87 opened this issue Oct 31, 2024 · 0 comments
Open
4 tasks done

Running switchover before leader shutdown #4024

dooman87 opened this issue Oct 31, 2024 · 0 comments

Comments

@dooman87
Copy link

dooman87 commented Oct 31, 2024

Have an idea to improve PGO? We'd love to hear it! We're going to need some information from you to learn more about your feature requests.

Please be sure you've done the following:

  • Provide a concise description of your feature request.
  • Describe your use case. Detail the problem you are trying to solve.
  • Describe how you envision that the feature would work.
  • Provide general information about your current PGO environment.

Overview

When the pod with a leader is terminating - run patroni switchover to minimize downtime.

Use Case

Operator version: 5.6

We are currently deploying our PostgresCluster with two replicas. Every replica is running on its own node. Our EKS cluster ran by the other team and they need to update nodes which is causing pods eviction and re-creation. When leader pod is terminated, then patroni will schedule failover and most of the time it will cause 2-4 seconds downtime, but sometime that downtime could take up to 20 seconds.

Desired Behavior

We are currently developing a sidecar that can run a preStop hook that will execute switchover if it's a leader.

Could that be a default behavior and preStop hook included into postgres container?

Environment

Tell us about your environment:

Please provide the following details:

  • EKS
  • Platform Version: (e.g. 1.20.3, 4.7.0)
  • PGO Image Tag: 5.6.0
  • Postgres Version 15
  • Storage: ebs
  • Number of Postgres clusters: 1

Additional Information

Would be curious to know if that's been considered before and the approach has any disadvantages?

@dooman87 dooman87 changed the title Running switchover before leader shutsdown Running switchover before leader shutdown Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant