Building Extensible Systems using Dynamically Loadable Modules
The Problem Every System Eventually Faces
You ship a monitoring agent that needs to collect metrics from 50 different services. Static linking means redeploying the entire binary for every new integration. That’s how we ended up with a 200MB binary at LinkedIn that took 8 seconds just to start.
The alternative is dynamic loading - plugins that load at runtime. PostgreSQL does this for extensions, Redis for modules, browsers for add-ons. But here’s what nobody tells you:
dlopen()is where simple architectures go to die. I’ve debugged production crashes caused by symbol conflicts between plugins, memory leaks from plugins that never actually unload, and 200μs stalls from lazy binding hitting critical paths.


