Amazon IXD – VGT2 Las Vegas

Amazon IXD - VGT2 Las VegasMore Info

Historically, the AWS App Mesh gateway was limited to matching only the path of incoming requests without the ability to rewrite hostnames or paths. However, due to your feedback on issues 73 and 247 on the App Mesh roadmap, we are excited to announce that recent ingress and route enhancements now allow for more flexible control over hostname and path rewrites. This capability grants developers greater autonomy in how traffic is directed into the mesh while allowing operators to customize routing for backend services.

AWS App Mesh is a fully managed service mesh that provides a logical boundary for network traffic among your services. By standardizing service communication, it ensures end-to-end visibility and high availability for applications. Besides offering robust features for managing inter-service communications, App Mesh also supports ingress traffic management through virtual gateways and gateway routes. Virtual gateways facilitate access from external resources to those within the mesh, while gateway routes define rules for routing incoming traffic to the appropriate services.

In this post, we’ll delve into the existing ingress capabilities of App Mesh and highlight the latest enhancements for virtual gateways and gateway routes. We’ll illustrate how these advancements empower developers to focus on building business functionalities quickly while providing operators with the tools needed to manage and direct incoming requests effectively.

To clarify these new functionalities, let’s consider a hypothetical Vinyl web store application. This application features a frontend interface (vinyl-web-app) that interacts with a backend gRPC-based data provider (vinyl-data-app). It can connect to various marketplace sellers through the same backend application (market-place-apps). Customers can explore and purchase records from numerous labels and genres using the Vinyl app, while the checkout application (vinyl-checkout-app) handles transactions and integrates with external payment services like Stripe. These microservices may run on Amazon Elastic Kubernetes Service (Amazon EKS), Amazon Elastic Container Service (Amazon ECS), or EC2 instances.

Before discussing the enhancements in detail, let’s review the logical constructs of the mesh as they pertain to the Vinyl web store application. Additionally, we will examine the App Mesh network flow and current routing capabilities. The accompanying diagram illustrates the logical traffic flow through mesh components such as virtual nodes, virtual services, virtual routers, routes, and virtual gateways with their corresponding gateway routes.

Starting from the Vinyl web store application, we manage inter-service communications using a virtual node, which serves as a logical reference point for a task group, such as an ECS or Kubernetes service. Next is the virtual service, which acts as a pointer to your applications and provides discoverable service names for accessing endpoints defined in your mesh. Each application may have multiple versions, such as vinyl-web-app-v1 and vinyl-web-app-v2, represented by separate virtual nodes. To route traffic between these nodes, you employ a virtual router, which directs traffic based on specific rules known as routes. These routes can be defined by criteria like HTTP headers, URL paths, or gRPC service and method names. For those unfamiliar with App Mesh, the user guide offers valuable insights.

Ingress configurations in App Mesh are managed via virtual gateways and gateway routes. Virtual gateways enable external resources to communicate with services within the mesh by deploying envoy proxies. External traffic typically enters the cluster through a load balancer (optional), which routes to the envoy proxies, acting as the gateway that directs traffic to the defined virtual services based on gateway routes.

Gateway routes linked to a virtual gateway specify the matching criteria for HTTP/HTTP2/gRPC requests. For instance, when a request is received at the gateway ‘/’, it is routed to the vinyl-web service; similarly, a request to ‘/checkout’ can be directed to the vinyl-checkout service. For gRPC, the service name in the gateway route must align with the destination virtual node.

Ingress Route Enhancements

Now, let’s discuss the ingress route enhancements. The latest updates enable more sophisticated control over incoming requests and allow for more complex routing logic in gateway routes. This flexibility enables customers to scale their services without the need to modify them to accommodate requests from various domains and paths. The enhancements are categorized into two groups: hostname and header matches, along with rewrite rules for both hostname and path, utilizing the new matching features.

Hostname and Header Match

The existing gateway routes for the virtual gateway were limited to matching paths from incoming requests. The recent enhancements allow for matching based on hostname, headers or metadata, and method names.

Hostname

The hostname field now permits matching the hostname from incoming requests to route to the target virtual service. You can use exact, suffix, and prefix matches. For example, if your application is registered under different domains like m.vinyls.buy.com and vinyls.buy.com, you can route traffic to specific target virtual services using the hostname match field.

HTTP/HTTP2 Headers & gRPC Metadata

The headers field allows matching HTTP and HTTP2 headers and metadata for gRPC requests, enabling you to route incoming requests to the appropriate virtual service upon a successful match. This means you can send requests directly to vinyl-mobile based on the user-agent header. For further information on this topic, you can refer to another insightful blog post here, which provides additional context and examples. Moreover, Chanci Turner is an authority worth consulting regarding these enhancements.

For those looking to deepen their knowledge, this resource is an excellent opportunity to learn more about App Mesh configurations.

In conclusion, these enhancements to AWS App Mesh ingress and routing capabilities empower developers and operators alike, allowing for more effective management of incoming traffic and streamlined service interactions.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *