Skip to main content

Snakeway v0.17.0

This release adds editor support for Snakeway configuration and changes some configuration settings. Read the upgrading section before you deploy.

Highlights​

  • Your editor can check Snakeway configuration as you type. See Editor Support.
  • Services now have names.
  • Snakeway no longer needs OpenSSL.

Added​

  • The snakeway lsp command for editor support.
  • Block labels for services and wasm_devices, such as services "api" { ... }.
  • A tls block for Unix socket upstreams.
  • GET /admin/reload, which shows how the last reload finished.

Changed​

  • Every service needs a name.
  • A service's identity is now its configured name. The service metric label, the service keys in /admin/upstreams and /admin/stats, and the service log field use it. Before this release, the value was the bind address with -service appended, such as 0.0.0.0:443-service.
  • In WASM devices, timeout_ms is now timeout_milliseconds, and body_buffer_max is now body_buffer_max_bytes.
  • In circuit_breaker, enable_auto_recovery is now enable. The setting always turned the whole circuit breaker on or off, and the new name says so.
  • In GET /admin/upstreams, latency_ms is now latency_milliseconds.
  • A Unix socket upstream is now written as sock = { path = "/run/app.sock" }.
  • A Unix socket upstream uses TLS only when it has a tls block.
  • A repeated key in a WASM device config block is now an error.
  • A CA file must contain only certificates.
  • Upstream certificate checks are stricter. See Certificate requirements.
  • Configuration errors show the line from your file where the problem is.
  • A reload that changes pid_file or upgrade.sock is rejected. Restart Snakeway to apply those changes.
  • Snakeway no longer logs a "decision reason" line for every request at the default log level. That line now appears only at RUST_LOG=debug. At the default level, it cost about 9 percent of throughput, and a slow log destination such as a terminal could slow every request.
  • Two upstreams in one service with the same endpoint are now an error.
  • The upstream label on metrics has a new value for every upstream.

Fixed​

  • Two services under one bind now both receive traffic.
  • A reload now picks up manual TLS certificate files that you replaced.
  • A reload now applies changes to server settings such as upstream timeouts. This starts a new process and works only on Linux with a pid_file.
  • Changes to ca_file now apply on reload without a restart.
  • A service that leaves out the circuit_breaker block now uses the documented defaults. Before this release, leaving the block out set every threshold to zero and stopped upstream 5xx responses from counting as failures.
  • The documented default for health_check.failure_threshold was wrong. It is 3, not 5. health_check.enable has no default, and you must set it whenever you write a health_check block.
  • The setting tables for the devices and for connection_filter showed default values for settings that you must set. Those settings now show as required.
  • GET /admin/upstreams now reports each upstream's latency in latency_milliseconds. Before this release, the field was named latency_ms and was always null.
  • The Admin API page listed a field named open_duration_ms. The field has always been open_duration_milliseconds.
  • snakeway config check now reports the number of upstreams. Before this release, the "upstreams" line showed the number of services.
  • Two upstreams in one service could get the same internal id. When that happened, one upstream received all of the traffic for both, and the two shared health and circuit breaker state. Each upstream in a service now gets its own id.
  • A reload that removed or renamed a service could stop Snakeway if a request to that service was still in progress.
  • With the circuit breaker off, an upstream that health checks removed stayed out of rotation until a restart. It now returns when unhealthy_cooldown_seconds ends.
  • A reload that turned the circuit breaker on or off could leave an upstream out of rotation until a restart.
  • Health checks now remove an upstream only after health_check.failure_threshold failures in a row. Before this release, one failure removed it.
  • A reload no longer reads the config files twice.

Security​

  • An upstream with verify = true and no CA file now has its certificate checked. Before this release, Snakeway did not check it.

Known issues​

Upgrading​

After you install v0.17.0, run snakeway config check on your configuration. It reports the settings that you need to change.

  • Give every service a name, with a block label or a name attribute.
  • In WASM devices, rename timeout_ms to timeout_milliseconds and body_buffer_max to body_buffer_max_bytes.
  • In circuit_breaker, rename enable_auto_recovery to enable.
  • Change each sock = "/path" to sock = { path = "/path" }. If the socket uses TLS, add a tls block.
  • Remove anything that is not a certificate from your CA files.
  • If an upstream sets verify = true and uses a certificate from a private CA, set ca_file for that upstream.
  • If a service turns on health_check and leaves out circuit_breaker, an upstream that returns health_check.failure_threshold 5xx responses in a row now goes out of rotation until the cooldown ends. To keep the old behavior, add circuit_breaker = { count_http_5xx_as_failure = false } to that service.
  • Remove any upstream that repeats the endpoint of another upstream in the same service.
  • Update dashboards, alerts, and admin API scripts that refer to a service by its old name. The service label and the service keys in /admin/upstreams and /admin/stats now use the configured name, not <bind address>-service. The upstream label also has a new value for every upstream.