Problem
Presto client performance has degraded after upgrade.
Answer
Third party BI tools often bundle the JDK with their product. If the upgraded client now includes JDK 11.0 or higher, the HTTP protocol defaults to HTTP/2 rather than HTTP/1.1. If you load the Presto Endpoint UI, you will observe his behavior: initiate connection, wait 2 minutes, initiate connection, run, wait two minutes, get results.
This is because the Presto endpoint understands only HTTP/1.1. Thus, every query (which consists of two parts: the request and the pull results), followed this path:
Presto client (spotfire/DBeaver) with jdk11 submits query
JDK converts query to an HTTP/2 request
Request passes through the ALB to Presto endpoint
Presto endpoint ignores request as it does not understand protocol
Request times out at two minutes
Presto client with jdk11 then makes HTTP/1.1 request
Presto endpoint receives and acts on request
Presto Coordinator marks task as complete
Presto client (spotfire/DBeaver) with jdk11 pulls results
JDK polls via an HTTP/2 request
Request passes through the ALB to Presto endpoint
Presto endpoint ignores request as it does not understand protocol
Request times out at two minutes
Presto client with jdk11 then polls as HTTP/1.1 request
Presto endpoint returns results
Recommended Solutions
Block the HTTP/2 protocol at the load balancer: This is especially a problem with the AWS Application Load Balancer (ALB), which enables HTTP/2 by default;
Configure the client to use HTTP/1.1; or
Configure the client to use a lower JDK rather than bundled.
Comments
0 comments
Please sign in to leave a comment.