Coding agents increasingly run the web apps they work on. Muru gives them its daemon over MCP: Claude Code deploys a broken change, finds a deadlock from worker stacks, rolls back, then fixes it.
grahamdumpleton.me/posts/202…
104
Lazy imports help a command line tool, but under a pre-forking Python web server they can make things worse, with each worker loading what it needs on first use. How Muru measures imports so you can decide what to defer and what to load before the fork.
grahamdumpleton.me/posts/202…
New post: "Muru: tracing in the toolbar". Turning on wrapture tracing under muructl run adds panels for each request's calls, SQL queries and outbound calls, and flags N+1 patterns. Used here to fix one in a small Flask app.
grahamdumpleton.me/posts/202…
89
New Muru post: a development toolbar on every page under muructl run, with each request's timings, logs and errors. Nothing installed into the app, works for any WSGI or ASGI framework, and across multiple worker processes. #Python
grahamdumpleton.me/posts/202…
New Muru post: conditions that watch its own figures, like the share of requests from AI crawlers, and trigger overlays that respond and then end once it is over. Plus a trap where a response hides its own cause.
grahamdumpleton.me/posts/202…
118
New post: Muru, overlays on a schedule. A read-only hour for backups, a maintenance page, a switch to a new release at 9am, each laid over a site's configuration and taken away again afterwards. #Python
grahamdumpleton.me/posts/202…
105
New Muru post: scaling to zero. An idle release first drops to no workers while keeping the process that has already imported the app, so waking it only needs a fork. Then the host can stop too, when memory matters more.
grahamdumpleton.me/posts/202…
93
New post: the Muru daemon scales workers for a Python web app, but also says when more workers isn't the answer: more threads, fewer because of the GIL, less garbage, or a blocked event loop. #Python grahamdumpleton.me/posts/202…
131
New post: running Python web apps on Kubernetes with Muru. A shutdown delay instead of a preStop hook, autoscaling on busy worker slots rather than CPU, and migrations as a Job. #Python #Kubernetes grahamdumpleton.me/posts/202…
96
New post: running Python web apps in a container with Muru. Worker settings checked against the container's limits, a guard on memory, probes on their own port, a clean shutdown on SIGTERM and a read-only root. #Python grahamdumpleton.me/posts/202…
1
123
Replying to @pedahzur_ak
Also see docs.muruhq.dev/en/latest/ho… which shows how Muru can be set up to trust a proxy in front.
1
12
Replying to @pedahzur_ak
I am not implementing that myself. Since the edge processes are using Rust I used an existing Rust module HTTP server stack with its TLS support. Likely the same module Granian uses. You can still put a proxy in front and if deploying to Kubernetes you use its ingress gateway.
1
1
18
New post: canary releases under the Muru daemon. A new release gets a share of the traffic, is judged against the release already serving, and is rolled back by itself if it does worse. No service mesh needed. #Python grahamdumpleton.me/posts/202…
110
New post: "Muru: releases, not restarts". Each deploy to the Muru daemon starts a new release beside the one serving, moves traffic once it's ready, and keeps the old one warm, so a rollback is just a routing change.
grahamdumpleton.me/posts/202…
Replying to @__amol__
Ultimately people will make their choices, but there is much more to hosting Python web applications well that the interface protocol.
38
Replying to @__amol__
WSGI and ASGI both have their strengths and weaknesses. Saying one rules over the other is misguided. Both have been hampered by inflexible hosting systems and that is what Muru hopes to improve on by supporting both and even in the same process so can mix paradigms.
1
38
Had another fun day of programming today. A month into building Muru with AI, and I can't remember the last time something was this engaging and fulfilling. Wrote about why it has become a lifestyle choice as I edge towards retirement.
grahamdumpleton.me/posts/202…
Adding websockets to an existing WSGI app usually means a second server and a proxy, or porting to ASGI. With Muru, a Flask view can hand the request to ASGI in the same worker instead. I also cover ASGI mounts and gRPC.
grahamdumpleton.me/posts/202…
Secure cookies, HTTP/2 and generated URLs all behave differently over HTTPS, but testing that locally usually means a proxy and a certificate to set up. With a Muru development run you add --https and it generates the certificate for you.
grahamdumpleton.me/posts/202…
Importing a Python web app once and forking workers from it can quietly break apps that open a socket or start a thread at import. Today's post covers how Muru checks what the import left behind, and falls back safely when it isn't fork safe.
grahamdumpleton.me/posts/202…
130
