Skip to content
Traffic endpoint and graceful shutdown for Elixir Plug apps
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib/web
src
test
.editorconfig
.gitignore
README.md
mix.exs
mix.lock

README.md

Kubernetes Traffic Plug

Support for graceful server shutdown under Kubernetes termination life-cycle.

The plug supports a /__traffic endpoint which normally returns 200. When the VM receives a SIGTERM signal, the endpoint starts returning HTTP error code 500, which, when used with an HTTP readinessProbe, ensures that traffic is routed away from the pod, before a delayed graceful shutdown begins.

See modules for detailed documentation, also my blog post, Graceful shutdown on Kubernetes with signals & Erlang OTP 20.

Installation

def deps do
  [
    {:k8s_traffic_plug, github: "Financial-Times/k8s_traffic_plug"}
  ]
end
You can’t perform that action at this time.