9
You have a few options. If you need a global constant variable, the config.xqy method mentions in @Andrew Orlov's answer is great because you avoid any locking from concurrent access to a properties.xml file.
If you need a variable that can be mutated across a cluster of nodes, the property.xqy example linked by @wst appears to use globally assigned namespaces to embed a retrievable key and value. Pretty clever. However, I'm not sure how much this is meant for heavy levels of change.
The E-node specific variable from @Eric Bloch is good, but please also be aware that it will not survive a system restart.
I'd be interested to know how these all compare performance-wise.