<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/killmestats-5frn64538" -->

---
title: killmestats | daily.dev
description: An interactive demo site called killmestats showcases fault tolerance in Gleam, Erlang, and OTP by monitoring a real host's CPU and RAM, streaming live stats...
canonical: https://daily.dev/posts/killmestats-5frn64538
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: killmestats | daily.dev
og:description: An interactive demo site called killmestats showcases fault tolerance in Gleam, Erlang, and OTP by monitoring a real host's CPU and RAM, streaming live stats...
og:url: https://daily.dev/posts/killmestats-5frn64538
og:image: https://api.daily.dev/og/posts/5FRn64538.png
og:image:alt: killmestats
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# killmestats

**[Awesome Elixir](https://daily.dev/sources/awelix)** · 2 min read · 0 upvotes · 0 comments

## Summary

An interactive demo site called killmestats showcases fault tolerance in Gleam, Erlang, and OTP by monitoring a real host's CPU and RAM, streaming live stats over WebSockets, and exposing an /api/panic endpoint that intentionally crashes its request handler. The demo illustrates how the BEAM's lightweight, isolated processes let unrelated work (the sampler, WebSocket connections) keep running even when one process fails, with Wisp catching the panic and returning a 500 while the rest of the system stays alive. Most of the project is written in Gleam, compiling to Erlang on the server and to JavaScript via Lustre on the client, sharing Gleam types across both.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://kms.andrewpavlov.org/>

## Questions this post answers

### Why does a crashing request handler not take down the whole Erlang/BEAM server?

Because the BEAM runs each request in its own lightweight, isolated process, a crash in one process does not affect others. In one demonstration, an /api/panic endpoint deliberately calls panic, Wisp catches it and returns a 500, but the background stats sampler and existing WebSocket connections keep running unaffected.

_daily.dev surfaces posts like this for developers exploring OTP and BEAM fault-tolerance patterns._

### How does Gleam share code between a server and a browser client?

Gleam compiles to Erlang for the server, which runs on the BEAM, and to JavaScript for the browser, where it can use the Lustre framework. Both targets share the same Gleam type definitions for data like stats and history, so identical data structures are used across the client/server boundary.

_Developers weighing full-stack language choices track cases like this on daily.dev._

## Similar posts on daily.dev

- [Try Gleam](https://daily.dev/posts/try-gleam-5x7z0rlrw) · Hacker News · 0 upvotes · 0 comments
- [Fuzzing The Gleam Compiler](https://daily.dev/posts/fuzzing-the-gleam-compiler-eruply9as) · Lobsters · 1 upvotes · 1 comments
- [GitHub - mandar1045/stampede: Load testing for Phoenix: Channels, LiveView, HTTP and WebSockets, in plain Elixir](https://daily.dev/posts/github---mandar1045-stampede-load-testing-for-phoenix-channels-liveview-http-and-websockets-in--bhcm2pm1l) · ElixirStatus · 2 upvotes · 0 comments
- [Gleam and BEAM- Looking beyond the JVM - John Mikael Lindbakk](https://daily.dev/posts/gleam-and-beam--looking-beyond-the-jvm---john-mikael-lindbakk-xvt2zfoy3) · Awesome Java Newsletter · 0 upvotes · 0 comments
- [BEAM There, Done That](https://daily.dev/posts/beam-there-done-that-nhe1vbeb1) · Erlang Forums · 2 upvotes · 0 comments

---

Tags: [#authentication](https://daily.dev/tags/authentication), [#erlang](https://daily.dev/tags/erlang), [#gleam](https://daily.dev/tags/gleam)

[View this post on daily.dev](https://daily.dev/posts/killmestats-5frn64538)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"killmestats","url":"https://daily.dev/posts/killmestats-5frn64538","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/killmestats-5frn64538"},"datePublished":"2026-08-27T20:09:01.770Z","dateModified":"2026-08-27T21:40:39.396Z","description":"An interactive demo site called killmestats showcases fault tolerance in Gleam, Erlang, and OTP by monitoring a real host's CPU and RAM, streaming live stats...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"Awesome Elixir","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Awesome Elixir","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/85a474f78b1b4d349119f7ce60d1438e","url":"https://daily.dev/sources/awelix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/killmestats-5frn64538","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"authentication,erlang,gleam","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Awesome Elixir","item":"https://daily.dev/sources/awelix"},{"@type":"ListItem","position":3,"name":"killmestats"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/killmestats-5frn64538#faq","mainEntity":[{"@type":"Question","name":"Why does a crashing request handler not take down the whole Erlang/BEAM server?","acceptedAnswer":{"@type":"Answer","text":"Because the BEAM runs each request in its own lightweight, isolated process, a crash in one process does not affect others. In one demonstration, an /api/panic endpoint deliberately calls panic, Wisp catches it and returns a 500, but the background stats sampler and existing WebSocket connections keep running unaffected. daily.dev surfaces posts like this for developers exploring OTP and BEAM fault-tolerance patterns."}},{"@type":"Question","name":"How does Gleam share code between a server and a browser client?","acceptedAnswer":{"@type":"Answer","text":"Gleam compiles to Erlang for the server, which runs on the BEAM, and to JavaScript for the browser, where it can use the Lustre framework. Both targets share the same Gleam type definitions for data like stats and history, so identical data structures are used across the client/server boundary. Developers weighing full-stack language choices track cases like this on daily.dev."}}]}
```

