Graham Dumpleton (@GrahamDumpleton) profile picture

C/Python developer. Interested in Apache, WSGI, Python web hosting, Jupyter/JupyterHub, Kubernetes, OpenShift, Docker and Platform as a Service (PaaS).

Sydney, Australia
Joined September 2010
Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)Photo by Graham Dumpleton (@GrahamDumpleton)
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…
1
1
2
319
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…
1
1
136
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: "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…
1
1
143
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…
2
1
205
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…
1
1
137
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…
2
1
8
211
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
New in the Muru series: how it fits together. The edge, controller, host and workers, the path a request takes through them, and why keeping Python off the client-facing side is what makes zero-downtime releases possible. #Python grahamdumpleton.me/posts/202…
1
1
192
FYI. Diagrams in this last posted got stuff up for some reason when the site was last deployed. Should be fixed now.
50
New post on Muru, about seeing what the workers of a running Python web app are doing: which worker a slow request is in, its stack right now, where the time goes under load, and attaching pdb to a breakpoint(). No agent, no code changes. grahamdumpleton.me/posts/202…
2
134
A first look at Muru, my new hosting system for Python web apps. Development mode, an access log that separates queue time from app time, and reloads where a broken import never takes the server down. grahamdumpleton.me/posts/202…
2
139