How Mattermost health checks keep traffic off unhealthy nodes
A load balancer or Kubernetes platform can only stop sending users to a bad Mattermost node if it has a signal that the node is bad. Your job is to choose that signal, wire it in, and confirm that it reflects what users actually experience. The health check matters most in a high availability cluster, where several application servers sit behind a load balancer and one failing node should drop out of rotation while the others keep serving chat. Mattermost documents high availability only for the Enterprise and Enterprise Advanced plans, so confirm your plan before you design the cluster around this behavior.
A check only helps if it tests the node that users reach. Probing a port that answers while the application is stuck, or probing through a path that bypasses the proxy users go through, gives a green light for a broken service. Map the exact path from the user's browser or client to the application server, including TLS termination, the proxy and any sticky session rules, and point the probe at that same node-level path. Treat the database and shared file storage as separate dependencies: a node can answer a simple probe while its database connection or mounted storage is failing, so decide whether those conditions should remove the node or raise an alert.
The page covers three building blocks at a high level. The /api/v4/system/ping endpoint is the basic liveness signal most load balancers and Kubernetes probes call. The goroutine health threshold is a server setting that marks the node unhealthy when its internal goroutine count crosses a limit, and the Mattermost Probe tool is the method for testing the service from outside. Confirm the current behavior of each one, including the endpoint's response fields, the setting's name and default, and how the probe tool is installed and run, against the current Mattermost deployment documentation for your server version before you write any probe configuration.
How probes, load balancers and nodes fit together
Traffic starts with users and reaches a load balancer or Kubernetes service on the public path, which forwards requests to each Mattermost application server. A separate internal probe network sends health checks to every node, so the balancer can stop sending traffic to a node that fails its check. Each node writes to the PostgreSQL primary and reads from replicas. In a high availability cluster, every node also mounts the same shared file storage, which must be Amazon S3, an S3-compatible service or NAS. Confirm that each probe reaches each node directly.
Probes check each node internally while users reach the cluster through one entry point.
Probe setup for load balancers and for Kubernetes
A classic load balancer in front of Linux or container nodes uses a health check to decide which backend receives traffic. The probe answers one question: should this node stay in the pool? It does not restart anything. The load balancer team owns the probe settings, while the Mattermost team owns the endpoint behavior and the server settings that influence it.
- Endpoint choice: Point the probe at
/api/v4/system/ping. Confirm with the documentation for your server version how a node that is starting or degraded responds, since the status code determines whether the node stays in rotation. - Goroutine threshold: The goroutine health threshold is a server setting that marks the ping unhealthy when goroutine count passes a limit. A value set too low can drain healthy nodes during busy periods, so set it from observed load and confirm the setting name in your version's configuration reference.
- Probe timing: Interval, timeout and failure count are configured on the balancer. Agree these values with the platform team so that a brief restart or slow database query does not drain every node at once.
- Mattermost Probe tool: Run it from outside the balancer to confirm that a user's path responds, not just that one node answers.
- Drain before maintenance: Remove a node from the pool before upgrades so in-flight sessions move cleanly.
Before go-live, check that the balancer alone marks nodes down, and test a forced failure in a non-production environment.
Kubernetes uses liveness and readiness probes with different consequences. Readiness controls whether a pod is listed as an endpoint of a Service and receives traffic. Liveness controls whether the kubelet restarts a container. These semantics come from the Kubernetes project, but the Mattermost endpoint each probe should call must be confirmed with Mattermost guidance for your version. The platform team typically owns the probe spec in the Deployment manifest or chart values.
- Readiness for traffic: Point readiness at the check that reflects the node's ability to serve users, and confirm that choice against Mattermost documentation.
- Liveness kept narrow: A liveness check that depends on the database can restart every pod during a database outage, which slows recovery. Keep it to a check that only fails when the process is stuck.
- Startup timing: Use a startup probe or an initial delay so slow first boots, including database migrations, are not killed. Measure migration time in your own environment.
- Shared dependency failures: During a database outage, readiness failures can remove every pod from the Service. That may be the intended behavior, but alerts should separate a shared outage from a single bad pod.
- Change control: Treat probe changes like any Deployment change, reviewed and rolled out through the same process as the rest of the workload.
In a staging namespace, simulate each failure and record which probe restarts the container and which removes the endpoint.
When the balancer tier is redundant, two or more balancers each run their own health checks against the same application nodes. Mattermost high availability is built from redundant application servers, database servers and load balancers, and it is available on the Enterprise and Enterprise Advanced plans. Consistent probing across balancers matters because a node removed by one balancer can still receive traffic from another, which produces inconsistent user experiences during incidents. The high availability cluster guide describes the overall layout.
- Consistent probe configuration: Use the same endpoint, timeout and failure count on every balancer so they reach the same conclusion about a node.
- Probe volume: Each balancer polls every node, so probe traffic grows with the number of balancers. Confirm the expected request rate with your balancer vendor and the capacity of the ping endpoint.
- Balancer failover: Health checks do not cover loss of a balancer itself. Verify that the virtual address or DNS failover moves within the time your recovery plan requires.
- Session affinity: Confirm that stickiness settings match on every balancer so users are not signed out during failover.
- Disagreement alerts: Alert when balancers report different pool membership for the same node.
Test by stopping one balancer and one application node at the same time, then confirm that traffic recovers without manual intervention.
Which probe settings fit each check
This table compares the settings a team must choose when wiring Mattermost into a load balancer or Kubernetes probe, and what each choice means for routing and restarts. Read each row as a decision: the option, when it fits, and what aggressive or conservative values cost you. Exact defaults and threshold settings belong to the configuration reference for your server version, so confirm them there before you set any values.
| Decision | What it controls | When it fits | Aggressive versus conservative |
|---|---|---|---|
| Endpoint to poll | Which URL the probe calls, such as /api/v4/system/ping | Use the ping endpoint for liveness-style checks; confirm with your server version whether it reports readiness or only process health | Aggressive: a shallow endpoint reacts fast but can miss a node that is up yet unable to serve users. Conservative: a deeper check catches more faults but adds load and false failures |
| Check interval | How often each node is probed | Routing decisions across a load balancer pool; restart decisions in Kubernetes | Short intervals detect faults sooner but add probe traffic on every node. Long intervals reduce noise but leave failed nodes in rotation longer |
| Check timeout | How long a probe waits before counting as failed | Set it above normal response time under peak load so busy nodes are not marked down | Short timeouts flag slow but healthy nodes during traffic spikes. Long timeouts hide genuine hangs and delay removal |
| Failures before removal | Consecutive failed checks before a node leaves rotation or restarts | Routing: a moderate count keeps a brief blip from draining capacity. Restarts: keep it higher so a transient database pause does not trigger a restart loop | Low counts remove nodes quickly but can cascade failures when one shared dependency slows. High counts keep broken nodes serving errors for longer |
| Recovery threshold before return | Consecutive successful checks before a node rejoins | Routing after an outage or restart, where a node should prove stable before taking live sessions | Low counts return capacity fast but can flap a node in and out. High counts protect users at the cost of slower recovery |
| Goroutine health threshold as an input | Whether a goroutine count limit feeds the health decision | Use it as an early signal when you have monitored a normal baseline; confirm the setting name and behavior in the configuration reference for your version | A strict threshold flags unusual load as unhealthy and can drain nodes during legitimate peaks. A loose one catches little. Set it from observed baselines, not from a guessed number |
| Routing only or restart use | Whether a failed probe only removes traffic or also triggers a restart | Routing only suits load balancers and planned maintenance. Restart use suits Kubernetes liveness checks where a wedged process will not recover alone | Using restart-level checks for routing decisions can turn a database slowdown into a fleet-wide restart. Keep the two decisions on separate checks where your platform allows |
How to wire the ping endpoint into your load balancer
This sequence takes a Mattermost cluster from a confirmed topology to a load balancer that checks every application server and removes a stopped node from rotation. Each step ends with a check your team can record, and the sequence should run in a test environment before production.
Confirm the plan and high availability topology
Confirm that your organization holds an Enterprise or Enterprise Advanced plan, because Mattermost lists high availability clustering as available only on those plans. Then document the topology: redundant application servers, redundant database servers, redundant load balancers, and shared file storage on Amazon S3, an S3-compatible service or a NAS mounted on each node. Check that the inventory lists every application server by its own address, and that the file storage mount is confirmed on each node. Local file system storage will not work correctly in a cluster and risks file corruption, so treat any node without the shared mount as a blocker. The high availability cluster-based deployment guide lists the components to verify.
Confirm each node is reachable from the probe source
Verify network paths from every load balancer that will probe the cluster to each application server's listening port. Firewall rules, security groups, and any proxy between the load balancer and the application servers must allow the probe traffic. Run a basic connectivity test from each load balancer host to each node address, and record the results. Check that every node accepts the connection from every probe source. If a node is unreachable from one load balancer, that load balancer will mark the node unhealthy for reasons unrelated to Mattermost, so resolve the network path before going further.
Call the ping endpoint directly on every node
From a host with access to the cluster, send a request to the
/api/v4/system/pingendpoint on each application server by its individual address. Do not test only the shared address in front of the cluster, because that address can hide a failing node behind a healthy one. Record the status code and response body from each node, and confirm the response matches what your Mattermost version documents as healthy. Check that all nodes return the same healthy result before you configure any probe. Confirm in the documentation for your version how the goroutine health threshold changes the response, since a node over that threshold may report unhealthy.Point the load balancer probe at every backend
Add each application server to the load balancer's backend pool by its individual address, then set the health check path to
/api/v4/system/pingand choose the protocol and port that match your Mattermost listener configuration. Apply the probe to every backend, not to one address representing the cluster. Check the load balancer's status page or API output to confirm that each backend appears with a healthy state. If a backend shows as unknown or unhealthy, compare its result with the direct call from the previous step before changing anything else.Set failure and recovery behavior
Define how many consecutive failed probes remove a node from rotation, how many successful probes return it, and how long each probe waits before it counts as a failure. Choose these values from your own load and network tests, and confirm acceptable ranges with your load balancer vendor and Mattermost support, since the appropriate settings depend on your environment. Avoid settings so aggressive that a brief slowdown removes healthy nodes, and avoid settings so lenient that a stopped node keeps receiving users. Export the final configuration and have the operations team review it. The check is a signed-off configuration file stored with your other infrastructure definitions.
Test that a stopped node leaves rotation
In a test window, stop the Mattermost service on one application server and watch the load balancer's health view for that node. Confirm that the load balancer marks it unhealthy within the window your failure settings define. Then check that no user traffic reaches it, by reviewing the node's access logs or request counts during the outage while users continue to work through the other nodes. Restart the service and confirm the node returns to healthy and begins receiving traffic again. Repeat the test for each node. The check is a documented pass for every node, including the recovery path.
Run the Mattermost Probe tool and record the runbook
Run the Mattermost Probe tool against each node as an independent check on the same behavior, and confirm in its documentation for your version what it reports and how to read the results. Then write a runbook that lists each node address, the probe path, the failure and recovery settings, the test results, and who receives alerts when a node leaves rotation. Have the runbook reviewed by the people who will respond to an incident. The check is a runbook that operators can follow at 2 a.m. without asking the original builders, and a probe result recorded for every node.
Checking the Probe tool and goroutine threshold before go-live
Before real users depend on the health setup, run three checks in a test environment and be clear about what each one proves. First, run the Mattermost Probe tool against the deployment through the same load balancer path users will take, so you confirm the endpoint answers end to end rather than only on the node itself. Second, watch what the goroutine health threshold reports while you apply realistic concurrent load, because a node can answer the ping endpoint while it is already struggling. Third, rehearse a single node failure: stop one application server while traffic runs and confirm the load balancer removes it, that users reconnect, and that the remaining nodes stay within their limits. Record the timings and the probe results so you have a baseline to compare against after upgrades.
Each test has a limit. A passing Probe run shows the path works at that moment, not that the service will hold during peak use or after a database failover. A goroutine threshold that stays quiet during your test only covers the load you generated, so set the threshold and load profile against your own expected peak. A node failure rehearsal in a small test cluster also does not prove behavior with your real file storage, database replicas or network latency. Treat these results as evidence for the configuration you tested, and repeat the checks when the topology, plan level or server version changes.
Before you script the Probe tool into a pipeline or a scheduled job, confirm its usage, output format and supported Mattermost versions in the official documentation, and pin the version you test against. Ask your Mattermost contact or check the Mattermost server deployment planning docs for the exact health and monitoring guidance that applies to your deployment type. Keep the test scripts, load profiles and results in your change records so a later reviewer can see what was verified and when.
Security and operational risks of health check configuration
Health checks decide which Mattermost nodes receive traffic and which get restarted, so a weak probe setup can expose internal endpoints, cause needless outages or hide a failing node. The cards below pair each risk with a control and a check to confirm in your own environment before the probes go live.
Health endpoints reachable beyond the probe network
The /api/v4/system/ping endpoint answers without a session, so anyone who can reach the application port can query it. Limit access to the load balancer and Kubernetes probe source addresses at the network layer, and keep the application port off public interfaces. Confirm in your environment which networks can reach each app server directly, including through a service mesh, ingress controller or monitoring server that may also scrape it. Record the answer in your network design so the rule survives infrastructure changes.
Probes that restart healthy nodes
A liveness-style probe with a short timeout or a tight failure threshold can mark a busy but working node as failed during a traffic spike, and the orchestrator then restarts it and shifts load onto the remaining nodes. The result is a restart loop that looks like an outage. Separate readiness decisions (stop sending traffic) from restart decisions (kill the process), and set timeouts and thresholds after measuring response times under your peak load. Confirm the values with your load test results, not defaults copied from examples.
Shallow checks that hide failing dependencies
A probe that only confirms the HTTP listener is up can report healthy while PostgreSQL or the shared file store is failing. Users then see errors on uploads and message loads while the load balancer keeps routing to the node. Pair the Mattermost ping with separate checks for database connectivity and file storage access, or with alerts on the errors those dependencies produce. Confirm what the ping actually verifies in your Mattermost version and test it by stopping the database in a staging cluster.
Probe settings changed during upgrades
Upgrades can change the path, port, protocol, or response expectations that a load balancer or Kubernetes manifest relies on, and a mismatch can mark every node unhealthy at once. Mattermost also releases server versions on a monthly cadence, so probe settings can drift if they are edited by hand on each node. Store probe definitions in version control, review them in each upgrade plan, and run the probe check against a staging node on the target version before rolling production. Confirm the endpoint response on the target version in its release notes.
- Monthly binary release day
- 16th
Removed nodes that raise no alert
When a probe takes a node out of rotation, traffic quietly moves to the other nodes, and the cluster can keep answering users while running with less capacity or a single point of failure. Without an alert on the count of healthy backends or on probe failures, the gap can persist for days. Create an alert on the number of healthy targets behind each load balancer pool and on repeated restarts, and route it to a channel that someone watches. Confirm that the alert fires by failing one node on purpose in staging.
Probe checks missing from the runbook
Teams often configure probes once and never document what a failed check means, who owns the response, or how to tell a probe failure from an application fault. During an incident, responders may disable probes to stop restart loops and forget to re-enable them. Write a short runbook entry that names the endpoint, the expected response, the owner of each probe setting and the steps for pausing and restoring checks. Confirm the runbook is reviewed alongside each upgrade plan and tested during a planned failover.
Questions teams ask before wiring health checks
Do health checks require the Enterprise plan?
The answer depends on your topology and the plan you hold, so confirm it before you design the probes. Mattermost's pricing page places high availability clustering in the Enterprise and Enterprise Advanced plans, and high availability consists of redundant application servers, database servers and load balancers. A single-server deployment has less at stake from a probe design, while a multi-node cluster behind a load balancer is the case where probes matter most and where the plan level matters. Ask Mattermost sales or your DeployOpen scoping call to confirm in writing whether the ping endpoint and the Mattermost Probe tool are included at your plan level. Pricing is handled through a quote, so the plan decision follows from your written scope and seat count.
How much effort does a health check setup take, and what drives it?
Effort is driven by how many nodes you run, which load balancer or Kubernetes platform sits in front of them, and how many environments must be configured and tested. A probe that only checks whether the server answers is less work than one that also covers the database path, and each added check adds testing. Your internal staff time is the main cost if you build it yourself. A partner is paid under a fixed-scope written agreement that lists the probe design, the environments covered and the retest after changes. The cost recurs whenever you upgrade Mattermost, because probe behavior should be rechecked against each new server version. Ask any provider to list each deliverable and what happens when the topology changes.
Can our own team wire health checks without a partner?
Yes, a team with working knowledge of its load balancer or Kubernetes platform and access to every Mattermost node can do this without a partner. The work is configuration plus testing, not a new architecture. A partner adds the most value when ownership is split across teams, when the probes must be documented for an audit or a security review, or when no one on staff has time to run failure tests. Before you start, confirm that someone can read the Mattermost configuration, change the load balancer targets, and roll back a change. Keep a written runbook so the next person can repeat the steps after an upgrade.
What do our load balancer and Kubernetes owners need to provide?
Your load balancer and Kubernetes owners must supply the probe path, the expected response, the check interval, the timeout, and the number of failed checks before a node is removed. They also need network access from the load balancer or kubelet to each application node, and they should confirm that the probe does not need a login. On Kubernetes, keep readiness and liveness decisions separate: a failed readiness check removes a pod from service traffic, while a failed liveness check restarts it. An overly sensitive liveness probe can cause restart loops during slow database responses, so agree on thresholds with the platform team before rollout. Record each setting in version control.
How long does verification take after the probes are in place?
Verification time depends on the number of nodes, how many failure scenarios you test, and how many environments need sign-off, and no researched timing applies to this topic, so ask your provider or your team to estimate it against your own topology. A reasonable verification pass covers each node answering the probe, a single node being stopped and drained from the load balancer, a node being restored and re-added, and an alert firing when the probe fails. Each scenario should have a written expected result. Ask for the verification steps and acceptance criteria in the scope before work begins, so the timeline is tied to specific tests rather than to an open-ended review.
How do we test a health check change before it reaches production?
Test every probe change in a non-production environment that matches production's node count, load balancer type and network path, then roll it out to production one node at a time. Mattermost releases a new server version in binary form on the 16th of each month, and Extended Support Releases such as v11.7 have a longer support window, so each upgrade is a natural point to retest probes. Include a failure test in each change: stop a node, confirm the load balancer removes it, restore the node, and confirm it returns. Keep the previous configuration so you can roll back quickly. Check the Mattermost server releases page before each upgrade window to confirm the support dates for your version.
Limits to confirm in your own environment
The health check design on this page depends on behavior that varies by server release, load balancer product and cluster version. The cards below list the items to verify in your own environment, with the place to get each answer. None of them should be assumed from general guidance.
Endpoint behavior for your release
Confirm what /api/v4/system/ping returns on your exact server version, including the status code, the response body and whether it reports database or file storage health or only process liveness. Responses can change between releases, and monthly releases and Extended Support Releases do not necessarily behave the same. Check the endpoint against the documentation for the release you run, then test it on a staging node with the database stopped to see what it actually reports. Record the result so your probe matches what the server returns, not what you assume it returns.
Goroutine threshold configuration
Confirm whether the goroutine health threshold is exposed as a setting in your release, which configuration key controls it, and what value your deployment should use. If it is not configurable, the probe may mark a busy node unhealthy under normal load, which can trigger restarts or removal from rotation at the wrong time. Ask the Mattermost documentation for your version and, if the threshold is set in the server configuration, confirm the change with a load test before it reaches production. Keep the setting under change control so it survives upgrades.
Probe tool versions and flags
Confirm which versions of the Mattermost Probe tool support your server release, which flags it accepts and how it reports failures. Tooling can lag the server, and a probe built for an older release may check the wrong paths or misread responses. Read the tool's own documentation for your version, run it against a non-production node, and confirm its exit codes before a Kubernetes exec probe or load balancer script depends on them. Pin the tool version in your deployment artifacts.
Load balancer health check behavior
Confirm how your load balancer product sends health checks, including the protocol, path, expected status codes, check interval, unhealthy and healthy thresholds, and whether it can match response content. Each product defines these differently, and a timeout shorter than the server's response time under load will drain healthy nodes. Ask the vendor for the documented behavior of your load balancer model and version, and test failover by stopping one application server while sending real user traffic.
Shared storage and replica behavior during failure
Confirm how a node failure interacts with shared file storage on Amazon S3, an S3-compatible service or NAS, and with database read replicas. A healthy ping does not prove that file storage or replica reads work for users on that node. Check the high availability documentation for your release, then run a failure test that stops a node, a file store connection and a replica, and observe what users see and which requests still succeed. Note any requests the health check misses.
HA cluster docsKubernetes version and probe support
Confirm the Kubernetes version your cluster runs, the probe types your platform and ingress controller support, and the version skew rules that apply during cluster upgrades. Liveness probes that restart pods on a slow dependency can cause restart loops, so the liveness and readiness probes may need different paths or timings. Check the Kubernetes documentation for your cluster version and the supported versions list, then run the probes during a rolling update in a test cluster to confirm pods leave rotation before they stop serving.
Kubernetes releasesHow DeployOpen scopes and delivers health check work
DeployOpen plans, implements and supports self-hosted open-source platforms inside your own infrastructure, including the health check wiring for Mattermost. We agree the scope in writing before work starts, then build and document the probes against the endpoints and settings your environment actually uses.
How we scope
- Inventory every load balancer, ingress and Kubernetes probe that will call the Mattermost server.
- Confirm which Mattermost plan and deployment shape apply, including whether a high availability cluster is in use.
- Agree written deliverables, acceptance tests and timelines before any configuration changes begin.
How we build
- Configure readiness and liveness checks against the /api/v4/system/ping endpoint on each application node.
- Set the goroutine health threshold deliberately, tested against normal peak load on your servers.
- Install and run the Mattermost Probe tool to verify end-to-end behavior from the network paths users take.
How we hand over
- Document each probe, its path, thresholds, expected responses and the reason each value was chosen.
- Walk your platform and operations teams through failure drills, such as a node that stops responding.
- Deliver configuration files and runbooks that your team can review, version and reproduce on other nodes.
How we support
- Offer ongoing support and retesting as a retainer when probe settings need review after upgrades.
- Re-verify health check behavior when Mattermost server versions change, using the release schedule you follow.
- Adjust thresholds and probe paths as the deployment grows, under the same written scope process.

