Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Health Route Laravel Package

gavtaylor/laravel-health-route

A small Laravel package that adds a configurable health check route to your application, making it easy for uptime monitors, load balancers, and deployment checks to verify the app is running and responding.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

gavtaylor/laravel-health-route is a Laravel package that exposes a health-check route, running a configurable set of checks and rendering results as either an HTML view (for humans) or JSON (for machines). v0.2.0 is an incremental, additive release: three new bundled checks (StorageWritableCheck, LogWritableCheck, EnvironmentCheck) plus two presentation-layer refinements to the default HTML view. Nothing is removed or renamed, so this is a low-risk version bump.

Architecture fit

  • Idiomatic Laravel package: service provider registration, publishable config, framework-native route and view layers. It occupies a thin vertical slice (HTTP route → check registry → renderer) rather than wrapping application services, so it slots into existing apps without imposing structure.
  • The HTML/JSON dual renderer maps cleanly onto two distinct consumers: on-call engineers and infrastructure probes. This is the package's core value proposition and the reason to prefer it over hand-rolling a /health closure.
  • The three new checks move it from "framework liveness" toward "environmental readiness" — storage and log writability are exactly the failures that produce silent, hard-to-diagnose incidents in production, so the bundled-check set is now materially useful rather than a demo.

Integration feasibility

  • composer require plus optional config publish; expected to be a sub-day integration for an existing Laravel app.
  • The new checks are almost certainly opt-in via config, which keeps the default payload lean. Confirm this rather than assume.
  • Both renderers being available means we can serve a browser-friendly dashboard and a strict JSON probe from the same check definitions — low duplicated configuration.

Technical risk

  • Pre-1.0 API surface (primary risk). v0.x signals no compatibility guarantee. Any breaking change in config key names, check interfaces, or route naming lands on us. Mitigation: pin to ~0.2.0 and treat upgrades as reviewed changes, not automated bumps.
  • HTML/JSON ordering divergence. The HTML view now sorts alphabetically while JSON preserves configured order. This is defensible (human scanning vs. stable machine-readable output) but it is an intentional asymmetry that must be documented for on-call staff, or it will read as a bug during an incident.
  • EnvironmentCheck disclosure risk. Environment checks commonly surface app env, debug flags, PHP version, or config values. If the health route is publicly reachable, this becomes an information-disclosure vector. This is the single most important thing to verify before rollout.
  • Write checks have side effects and I/O cost. StorageWritableCheck and LogWritableCheck perform filesystem writes on every invocation. Under aggressive probe intervals (k8s defaults can be every 10s, per replica), that is continuous disk I/O and log noise.
  • LogWritableCheck self-referential failure mode. If the check writes to the log channel to prove writability, a failing log target may produce errors the check itself cannot report. Confirm whether it probes the handler or emits a test record.

Key questions

  1. Supported PHP and Laravel version matrix (Laravel 11/12, PHP 8.2+)?
  2. Does EnvironmentCheck expose any values, and are they gated behind a config flag defaulting to off?
  3. How is HTML vs. JSON negotiated — Accept header, query parameter, or separate routes? Can JSON be forced deterministically?
  4. Are check results cached, and is there a TTL to bound the cost of write checks under frequent probing?
  5. Are checks individually weighted — i.e., can a degradable check (log writability) warn without failing the whole endpoint and triggering a restart loop?
  6. What HTTP status codes are returned on failure (503 vs 200-with-body)? Load balancers depend on this.
  7. Is the route registered by default, and with what middleware? Auth, IP allowlist, rate limiting?
  8. Licence and maintainer posture — single-maintainer project? Release cadence?

Integration Approach

Stack fit

  • Assumes a containerised Laravel deployment behind a load balancer or Kubernetes. The JSON renderer is the probe target; the HTML view is an internal dashboard.
  • Recommend two route surfaces: a public/network-restricted JSON liveness endpoint, and an authenticated HTML dashboard for engineering. Do not expose one route doing both if EnvironmentCheck is enabled.

Migration path

  • Greenfield for us (no incumbent health package), so this is an additive integration with no migration burden and no data model impact.
  • Fallback is trivial: the package is a thin wrapper, so replacing it later means reimplementing a route and a handful of check classes. Sunk cost is low, which meaningfully de-risks the pre-1.0 status.

Compatibility

  • Constraint strategy: "gavtaylor/laravel-health-route": "~0.2.0" — accept patches, gate minors behind review.
  • Verify the package's Laravel constraint against our current framework version before committing; v0.x packages frequently lag the newest major.

Sequencing

  1. Spike (0.5 day): install in a non-production app, enable all three new checks, capture exact HTML and JSON output. Specifically confirm what EnvironmentCheck renders and how JSON is selected.
  2. Security review: decide route exposure, middleware, and whether EnvironmentCheck is enabled at all per environment.
  3. Probe design: define separate liveness (process up, no dependencies) vs. readiness (storage/log writable) endpoints. Enable write checks on readiness only, with a longer probe interval and a result TTL.
  4. Config hardening: pin check order explicitly in config so JSON output is stable; add a note in the runbook about the HTML alphabetical sort.
  5. Rollout: staging for one week watching disk I/O and log volume attributable to the checks, then production behind an allowlist.
  6. Observability hook: if the package exposes events or an extensible check interface, forward failures to our alerting pipeline rather than relying on probe scraping alone.

Operational Impact

Maintenance

  • Low code footprint, but the v0.x version line means upgrade review is a recurring, if small, tax. Budget a short review per minor release.
  • Config is the main drift surface: check lists, ordering, and enabled/disabled state per environment. Keep it in version control and code-review changes, since a mis-ordered or disabled check silently changes what "healthy" means.

Support

  • Small, single-maintainer open-source project. No vendor SLA. Accept that upstream fixes are best-effort and that we may need to vendor a patch or fork a check class.
  • Internal support burden is low — the failure surface is a route and a handful of check classes, well within any Laravel team's competence.

Scaling

  • Cost scales with probe frequency × replica count, not with traffic. Write checks on every probe across many replicas is the scaling concern; a result cache with a short TTL (or probing readiness less frequently than liveness) resolves it.
  • No database or external-service dependency introduced by v0.2.0, so no new connection-pool or latency exposure in the request path.

Failure modes

  • False negative (worst case): endpoint reports healthy while the app is degraded — e.g., a check throws and is swallowed, or the route itself is unreachable. Mitigate by monitoring the probe endpoint from outside the cluster.
  • False positive restart loop: a degradable condition (log volume full) reported as hard failure on a liveness probe causes the orchestrator to restart healthy pods, which does not fix a full disk. This is the highest-severity misconfiguration risk and is directly enabled by the new write checks — hence the liveness/readiness split.
  • Information disclosure: EnvironmentCheck on a reachable route leaking env or config values.
  • I/O amplification: write checks producing continuous disk writes and log entries; the latter can itself fill the disk the check is testing.
  • Ordering confusion: an operator comparing the HTML dashboard to a JSON payload sees different orderings and misreads it as inconsistent data. Documentation fix.

Ramp-up

  • Very low. Any Laravel developer can read the config and understand the check set in under an hour; on-call staff need a short runbook section covering the two renderers, the ordering asymmetry, and the liveness-vs-readiness contract. Estimated total enablement effort: one to two days end-to-end including the security review.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc