Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http2/gRPC support #96

Closed
skiyani opened this issue Aug 23, 2019 · 2 comments
Closed

Http2/gRPC support #96

skiyani opened this issue Aug 23, 2019 · 2 comments
Assignees

Comments

@skiyani
Copy link

skiyani commented Aug 23, 2019

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’s 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’s listener encapsulates a HealthCheckPolicy that has a port number and a protocol specification. The listener’s 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"
         ]
      }
   }
}
@skiyani skiyani added the Roadmap: Proposed We are considering this for inclusion in the roadmap. label Aug 23, 2019
This was referenced Aug 24, 2019
@lavignes lavignes changed the title [Proposed]: Http2/gRPC support Http2/gRPC support Aug 24, 2019
@jamsajones jamsajones added the Roadmap: Accepted We are planning on doing this work. label Sep 26, 2019
@shubharao shubharao removed the Roadmap: Proposed We are considering this for inclusion in the roadmap. label Sep 26, 2019
@lavignes lavignes self-assigned this Sep 27, 2019
@lavignes
Copy link

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

@lavignes
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants