lyft / presto-gateway

A load balancer / proxy / gateway for prestodb
Apache License 2.0
358 stars 156 forks source link

presto-gateway support low-latency HA #125

Open sjx782392329 opened 3 years ago

sjx782392329 commented 3 years ago

We use presto-gateway as proxy front of the Presto cluster. Presto-gateway stores query_id and next_url in the memory.

If presto-gateway is down, the mapping relationship between query_id and next_url is lost. Although presto can get mapping relationship by using mysql, it is too slow.

We deploy presto-gateway on the k8s, it is common for presto-gateway instances to restart. So we stores mapping relationship in the Redis. Presto-gateway becomes stateless service.

There are some advantages

I think this feature can make Presto-gateway highly available. Now I want to contribute this feature to the presto-gateway.

endoplasmicR commented 3 years ago

hi, we are running presto-gateway on k8s and it is stateless. have you run into any issues?

sjx782392329 commented 3 years ago

hi, we are running presto-gateway on k8s and it is stateless. have you run into any issues?

I used the http protocol before, and now I use presto-gateway which is the https protocol. In Java 1.8 some versions jdbc-client can encounter timeout or get request blocked.