HTTP routing on Heroku is made up of three main logical layers:
- The state synchronization layer ensures that all nodes in the routing stack are aware of the latest changes in domains, application, and dyno locations across the platform;
- The routing layer chooses which dyno will handle an HTTP request (random or sticky), performs logging, error-reporting, and so on;
- The HTTP proxying layer handles the validation, normalization, and forwarding of requests between clients and dynos.
This last part is the one the platform team is happy to open-source today with the Vegur library.