What are Routes in context of OpenShift ?
Let’s say we need to have a way to reach a service in OpenShift. So we gave that service a name, for example: www.reach-my-service-as-route.com.
So simply put we gave it an externally reachable hostname and defined that as a Route. Because of this connectivity now external clients can reach our applications. Each route consists of a route name which is limited to 63 characters. Service selector and security configuration which is optional.
OpenShift Routers support the following protocols as of today: HTTP, HTTPS (with SNI), WebSockets, TLS with SNI.
Note: Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS).
Even though OpenShift service helps will load balancing. A router uses the service selector to find the service and the endpoints supporting the service. Service-provided load balancing is avoided and substituted with the router’s private load balancing.
In OpenShift Routes if two routes claim the same host, the oldest route wins. Same applies if multiple routes with the same path are used, the oldest takes priority.
A service with an externally reachable host name aka a template for a Route with a Specified Host:
A service with an externally reachable host name aka a template for a Route A without a Host:
For a detailed explanation on Routes in OpenShift follow the Red Had OpenShift Documentation.