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

PCS deployment should activate new revision before stopping the old one #4350

Open
premun opened this issue Jan 21, 2025 · 0 comments
Open
Assignees

Comments

@premun
Copy link
Member

premun commented Jan 21, 2025

Context

During the deployment, we do this:

  • Call STOP on the currently running service
  • Wait until it goes from Stopping (finishing last work item) to Stopped
    • If this does not happen within an allotted time, we continue
  • Make the new revision active and start it

This is wrong for several reasons:

  • If the old service fails to report as stopped, or fails to stop but does not really do anything, we do not process work items for 20 minutes while we are waiting for this
  • We can deploy the new service as active and let the old version finish the work items in background, regardless of which revision is active
  • We can even let the new service start processing right away because the old one is not supposed to process any work items any more so we are just delaying what's going to happen anyway - new revision processing the work items that are waiting

Goal

Change the deployment to go like this:

  • Start the new service right away
  • Transfer all traffic to the new service
  • Stop the old service
  • Wait for the old service to stop fully (or until timeout) and inactivate it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants