Aws-app-mesh-roadmap: Http2/gRPC support

Created on 24 Aug 2019  路  2Comments  路  Source: aws/aws-app-mesh-roadmap

Outlined in this issue is our proposed solution for supporting HTTP/2 and gRPC traffic with App Mesh. This solution is intended to allow customers who rely on HTTP/2 or gRPC. We will add support for these two protocols which can be specified in virtual node and virtual router listeners, routes, and retry policies (#7).

Listener support will be added in both virtual nodes and routers. HealthChecks will also be updated to support these new protocols. In order to remain consistent with our current approach to routing HttpRoute and TcpRoute we will support two new types of routes, Http2Route and GrpcRoute. These new route types will be specified within the App Mesh RouteSpec. There will also be an update to the retry policy within each of these two new routes.

Listeners

Virtual nodes and virtual routers have a spec attribute which define a list of listeners that the virtual node (or virtual router) is expected to receive inbound traffic from. Each listener defines a port mapping object which in turn has a port number and a protocol specification exclusively. The listener鈥檚 port mapping protocol will be will be updated to accept the values _http2_ or _grpc_ along with the current _http_ and _tcp_ options. An example for HTTP/2 support will look like the following:

{
   "listeners": [
      {
         "portMapping": {
            "port": 443,
            "protocol": "http2"
         }
      }
   ]
}

Healthcheck

A virtual node spec鈥檚 listener encapsulates a HealthCheckPolicy that has a port number and a protocol specification. The listener鈥檚 healthCheck parameter will be updated to accept _http2_ and _grpc_ for the protocol value. An example for the HTTP/2 case:

{
   "listeners": [
      {
         "healthCheck": {
            "port": 443,
            "protocol": "http2"
         }
      }
   ]
}

gRPC health checks would conform to the gRPC Health Checking Protocol.

Routes

The Http2Route will be identical to the current HttpRoute. The new GrpcRoute object will be defined with an identical action as the other route types but the match will be specific to gRPC. An example for GrpcRoute:

{
  "grpcRoute": {
    "action": {
      "weightedTargets": [
         {
           "virtualNode": "virtual_node_a",
           "weight": 1 
         }
      ] 
    },
    "match": {
      "serviceName": "my_grpc_service",
      "methodName": "my_grpc_method",
      "metadata":  [
        {
          "invert": false, 
          "name": "metadata_field_name",
          "match": {
            "exact": "some_value"
          }
        }
      ]
    }
  }
}

Retries

The Http2Route will have a retryPolicy, that will support TCP and HTTP/2 retry events.

{
   "http2Route" : {
      "retryPolicy" : {
         "httpRetryEvents": [
            "stream-error"
         ]
      }
   }
}

GrpcRoute will have a retryPolicy that will support TCP, HTTP/2, and gRPC retry events.

{
   "grpcRoute" : {
      "retryPolicy" : {
         "grpcRetryEvents": [
            "unavailable"
         ]
      }
   }
}
Shipped

Most helpful comment

Hi again! We're pleased to announce that gRPC and HTTP/2 support are available in all App Mesh regions. SDKs and Documentation have been updated to reflect the new APIs.

AWS CloudFormation support is rolling out, so expect that in all App Mesh regions over the next few days. I'll leave this issue open in the mean-time but I just wanted to notify any watchers that this is now generally available.

All 2 comments

Hi all. We've just published two small example apps for using App Mesh with gRPC and HTTP2 on our examples repository. The feature is now enabled on our Preview Channel. The documentation is still not updated to reflect the new features in preview but we'll get that out ASAP. The APIs we implemented are the ones listed in this issue.

Feel free to give them a try:
https://github.com/aws/aws-app-mesh-examples/tree/master/walkthroughs/howto-http2
https://github.com/aws/aws-app-mesh-examples/tree/master/walkthroughs/howto-grpc

Hi again! We're pleased to announce that gRPC and HTTP/2 support are available in all App Mesh regions. SDKs and Documentation have been updated to reflect the new APIs.

AWS CloudFormation support is rolling out, so expect that in all App Mesh regions over the next few days. I'll leave this issue open in the mean-time but I just wanted to notify any watchers that this is now generally available.

Was this page helpful?
0 / 5 - 0 ratings