Coder Social home page Coder Social logo

Implement graceful shutdown about ztunnel HOT 4 CLOSED

howardjohn avatar howardjohn commented on July 19, 2024
Implement graceful shutdown

from ztunnel.

Comments (4)

stevenctl avatar stevenctl commented on July 19, 2024

Refuse all new connections, wait for existing connections to complete before shutting down.

Kubernetes' default 30 second grace period should probably have a sensible override.

John’s comment:

  1. On SIGTERM, enter "awaiting shutdown". Basically this would just sleep for X seconds.
  2. After X seconds, enter "draining"; reject new connections and wait for existing ones. This should last a really long time probably (but outside of scope here to decide how long)
  3. Hard shutdown

(1) is important to avoid race conditions where clients are still programmed to send to the ztunnel. once (2) happens, we shouldn't get new connections.

Connection refusals are not retried in ambient world so its important to reduce them

If we can somehow indicate over HBONE that we are draining that is nice too, I haven't thought of any way to do that though.

from ztunnel.

howardjohn avatar howardjohn commented on July 19, 2024

#62 implements the basics, but it doesn't do proper shutdown

from ztunnel.

hzxuzhonghu avatar hzxuzhonghu commented on July 19, 2024

I think still need connection graceful shutdown

from ztunnel.

howardjohn avatar howardjohn commented on July 19, 2024

this is implemented.

from ztunnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.