How should I configure the nginx.conf to be HA of queries?

Hi I am using druid version 0.12.0, and we choose the superset as our web ui for querying.We had set up a 3 broker nodes cluster, but only one broker node can accept queries at one time or another, we would use the nginx to be HA of queries, how should I config the nginx.conf to accept the queries of superset and redirect them to one of broker nodes randomly?

I’m not familiar with Nginx configuration, but it looks like Nginx has load balancing: http://nginx.org/en/docs/http/load_balancing.html

You could also try running a Druid “router” node, which can load balance Druid queries: http://druid.io/docs/latest/development/router.html

But there are some differences between “router” node and nginx, for example, we have a datasource which has high concurrency queries, we set it as “hot tier”,other datasources are “default tier”. if we choose “router” node, all hot tier queries are sent to a set of brokers that we specified, other queries to the other set of brokers. However, we prefer the hot tier queries randomly are sent to one of all broker nodes, this is what we want , and we think this way can reduce the load of any broker node well.So we didn’t choose the “router” node.

Jonathan Wei jon.wei@imply.io 于2018年7月11日周三 上午4:10写道:

thank you guys, it works!I set up the nginx cluster and configure rules in order to route the specifies broker nodes for different queries

张鑫 zhangxin20171201@gmail.com 于2018年7月11日周三 上午8:08写道: