Summary: When using the OkHttp client library for HTTP2 there are several things to keep in mind:
- There is a 320 byte optimal chunk size for streaming the user's voice to the server.
- If your HTTP2 client has a timeout on a response body being available (the read timeout) then to make sure it's at least an hour for a downchannel.
- If your HTTP2 client deals with pooling or marking connections as idle, it will not mark a connection as idle for an hour.
- There is a 10 concurrent stream max allowed by the server. This should be transparent as the client will handle it, but it is something to be aware of.
- Different time outs are fine, but your implementation needs to handle the requests or the connection ending early because a disconnect will be forced every hour. They should be resilient to every request or connection ending at any time.
Keywords: alexa voice service, okhttp, http2 client