Fly.ioTutorial
Observing Elixir in Production
Summary
Observer, included with Elixir and Erlang’s BEAM, is a WxWidgets interface that connects in real time to running nodes, showing process trees and state while allowing processes to be killed. This guide uses Fly.io to connect a local Observer to production nodes through a release cookie, a WireGuard tunnel, and a helper script. The example is a multi-region Tic-Tac-Toe application in Frankfurt and Los Angeles; a local IEx session joins the remote cluster, and Observer can connect to either node. Inspecting a live game exposes its GenServer state in Erlang representation. Killing its process immediately starts a replacement with a different PID and leaves other games running, but recovery still requires the player to reload the page or restart game joining.
Context
Production servers do not have a windowing UI, while Observer’s graphical interface can provide realtime visibility into running BEAM nodes. The post uses this setup to investigate application behavior and test recovery from process failures.
Approach / What changed
Configure an Elixir release with a supplied cookie, establish a WireGuard VPN connection to the Fly private network, create a script that launches Observer, and use a local IEx session to join the remote cluster. The example deploys a multi-region Tic-Tac-Toe application and inspects or terminates its processes remotely.
Takeaways
A local Observer instance can connect to Elixir nodes running across Fly regions through a WireGuard tunnel and a shared release cookie.
Observer exposes process trees and GenServer state, with state displayed in Erlang’s representation of Elixir data types.
Killing a game process starts a replacement without affecting other running games, but the player must reload the page or restart game joining to recover.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.