As we saw in the Matching Rules section, Routes in Gloo contain a Matcher to determine if a request should be passed along the route. If a route is matched, then the route also specifies an action to take: routing to one or more destinations, redirecting, or returning a direct response.
In this section, we’ll take a deeper look at different ways to specify route destinations. Most commonly, a route destination is a single Gloo Upstream. It’s also possible to route to multiple Upstreams, by either specifying a multi destination, or by configuring an Upstream Group. Finally, it’s possible to route directly to Kubernetes or Consul services, without needing to use Gloo Upstreams or discovery.
When routing to an Upstream, you can take advantage of Gloo’s endpoint discovery system, and configure routes to specific functions, either on a REST or gRPC service, or on a cloud function. This is covered more in Function Routing.
The section listing is shown below. We recommend starting with Single Upstreams and more specifically with Static Upstreams, and then evaluating more complex route destination types.
Single Upstreams: Routing to a specific Gloo Upstream -- for instance a Kubernetes service, AWS Lambda, or EC2 instance.
Multiple Upstreams: Load balancing requests to a specific route across multiple destinations.
Redirect Action: Configure Gloo to redirect requests to a route instead of routing to a destination.
Kubernetes Services: Routing to services that are registered as Kubernetes Services by querying the Kubernetes API.
Consul Services: Routing to services that are registered in Consul service-discovery registry
Direct Response Action: Respond with a direct response instead of being proxied to any backend