Running Looker behind a proxy server or load balancer

  • 9 January 2015
  • 3 replies

Userlevel 5

There are a few issues that can be caused by load balancers.

First, if the timeout is too short on the load balancer, Looker may generate a gateway timeout error. This error occurs in the javascript and manifests in the Looker app as a generic “Something Went Wrong” error. The only way to see the timeout error is with the developer / javascript console, where you will see a gateway timeout error on one of the JS calls.

Second, the headers may get messed up by the load balancer. Internally, Looker uses the following settings on our proxy server to avoid this issue:

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header Accept-Encoding "";

proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# Uncomment if behind ELB

#real_ip_header X-Forwarded-For;




proxy_set_header X-Forwarded-Proto https;

3 replies

To expand on this, if your browser loses connection to the web server (Looker), Looker will actively kill the query that you were running. This is to minimize load on the database, e.g. make sure that if a user starts a query, loses interest (closes the tab / browser), they are not still consuming database resources.

Many proxy settings have a default timeout (e.g. 60 seconds) that will result in any queries that take longer than the timeout period getting killed.

We are planning to have looker in a secure green zone,  and embedding looker dashboards, looks on a portal that is exposed externally on the Internet to logged in customers - do you have an architecture for this ?

Here is the flow

Browser -→  → Security gateway (reverse proxy) → (looker domain)

What we notice is, when looker iFrame is loaded, on embedded login - looker redirects users to*

And I notice, to completely paint the report in the iFrame, several other calls happen from browser to looker**

This works fine in company Intranet since browser will recognize DNS: but for a customer on the Internet, browser does not recognize ( intranet link)  so the reports do not load inside the iFrame.

Is there a way to make this work ? 







The solution seems to work after we added these 2 headers in the reverse proxy