Skip to content

Add ability to drain the listeners using the admin interface #4460

Closed

Description

@PiotrSikora

Title: Add ability to drain the listeners using the admin interface

Description:
Drain the listeners on demand, with the assumption that we're going to shutdown shortly afterwards, so future updates to those listeners should be ignored.

cc @nmittler

Activity

  1. ramaraochavali commented on Sep 19, 2018

    @ramaraochavali
    Contributor

    It may be useful/partial solution to address this issue as well istio/istio#7665

  2. added
    enhancement
    on Sep 19, 2018
  3. cmluciano commented on Sep 19, 2018

    @cmluciano
    Member

    @PiotrSikora I haven't explored this part deeply, but isn't this supposed to be the desired effect of "/quitquitquit" or is that behavior more synonymous with "/abortabortabort" ?

  4. mattklein123 commented on Sep 19, 2018

    @mattklein123
    Member

    This should be pretty easily doable by allowing programmatic access to the existing drain functionality that is kicked off as part of hot restart.

  5. PiotrSikora commented on Sep 19, 2018

    @PiotrSikora
    ContributorAuthor

    @cmluciano it's the first half of /quitquitquit, really. The major use case for use would be to stop accepting incoming connections when acting as a sidecar, but still let the application to make outgoing connections (see #4461).

  6. bplotnick commented on Sep 19, 2018

    @bplotnick
    Contributor

    I think this is related to our need for per-listener shutdown - we run a single shared envoy per host instead of one-per-pod. If (our equivalent of) a pod is going down, we want to be able to just shut down that ingress listener. We do this today with our healthcheck cache , but we'll want to do this with Envoy in the future.

    I think this might actually make the implementation easier, since if you had per-listener control, i presume that you could just drain the ingress listener but still keep the egress listener alive.

  7. stale commented on Oct 20, 2018

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

  8. added
    stale
    on Oct 20, 2018
  9. stale commented on Oct 27, 2018

    @stale

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

  10. removed
    stale
    on Oct 27, 2018
  11. ramaraochavali commented on Sep 26, 2019

    @ramaraochavali
    Contributor

    @mattklein123 We are interested in this feature. Just want to understand at a high level if the following is sufficient

    • add a admin endpoint /drain_listeners that drains all listeners.
    • add additional parameter like /drain_listeners?inboundonly - will drain only inbound listeners because that is what most people would want when a rolling upgrade happens because incoming connection should be stopped while inflight work should continue which may use outbound listeners. Since traffic direction is added to listener now - we can easily distinguish inbound/outbound listeners.

    What do you think about that approach?

  12. mattklein123 commented on Sep 26, 2019

    @mattklein123
    Member

    @ramaraochavali this sounds good to me. I think you could later also add a query param to even drain by name, etc.

  13. ramaraochavali commented on Sep 27, 2019

    @ramaraochavali
    Contributor
  14. deiwin commented on Feb 7, 2020

    @deiwin

    Wonder if the ?inboundonly parameter could be added to /healthcheck/fail as well, to also initiate draining for inbound listeners only, but without rejecting new connections. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementhelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions