OK, I’m trying the best way to handle this:

On a Drupal 7 site I had a poor man’s URL shorter.  I create a slug by encoding a node’s NID using an algorithm that wouldn’t contain a vowel.  In hook_boot I’d test to see if there was a vowel and in the URL’s path.  If there wasn’t I’d decode the slug and redirect to /node/nid otherwise Drupal would continue doing its thing.   Since all the content is in English any aliases would contain vowels so I was OK.  It worked well and would redirect before Drupal fully bootstrapped, saving some cycles.

I’m thinking about moving this to Drupal 8.  I’ve been debating between building a module with an event subscriber and just putting the code at the top of settings.php.    Any thoughts or advice please answer on stack exchange.