Runtime feature kill switches allow parts of an web application to be temporary disabled for maintenance reasons.
In it simplest level, a runtime feature kill switch is a die or exit() statement (using the php analogy) which terminates the script before the disabled parts can be reached.
But that still requires coding and direct access to the server to kill a feature during runtime. Ideally you want it to make it to non-developers and make it available through a web interface.
Things to consider when implementing a runtime feature kill switches:
- The functionality to administer the kill switches may not have any dependencies which can be killed. (like databases)
- It should be possible to see which kill switches are enabled.
- Application should gracefully support disabled features, so it needs to know a feature has been disabled (for example by returning a disabled code)
- Kill switches need to be robust and transparent, enabling/disabling should be direct and complete. especially when using file-level feature kill switches, you have to face read-write locking
- If you use caching, ensure you introduce cache warmup/flush mechanisms when re-enabling features.



