|
| 1 | +---- |
| 2 | +layout: post |
| 3 | +title: "Accelerating Looker with Databricks SQL Serverless" |
| 4 | +tags: |
| 5 | +- looker |
| 6 | +- databricks |
| 7 | +- featured |
| 8 | +team: Core Platform |
| 9 | +author: hamiltonh |
| 10 | +---- |
| 11 | + |
| 12 | +We recently migrated Looker to a Databricks SQL Serverless, improving our |
| 13 | +infrastructure cost and reducing the footprint of infrastructure we need to |
| 14 | +worry about! “Databricks SQL” which provides a single load balanced Endpoint |
| 15 | +for executing Spark SQL queries across multiple Spark clusters behind the |
| 16 | +scenes. “Serverless” is an evolution of that concept, rather than running a SQL |
| 17 | +Endpoint in our AWS infrastructure, the entirety of execution happens on the |
| 18 | +Databricks side. With a much simpler and faster interface, queries executed in |
| 19 | +Looker now return results much faster to our users than ever before! |
| 20 | + |
| 21 | +When we originally provisioned our “Databricks SQL” endpoints, we worked |
| 22 | +together with our colleagues at Databricks to ensure [the terraform provider |
| 23 | +for Databricks](https://github.com/databricks/terraform-provider-databricks) is |
| 24 | +ready for production usage, which as of today is Generally Available. That |
| 25 | +original foundation in Terraform allowed us to more easily adopt SQL Serverless |
| 26 | +once it was made available to us. |
| 27 | + |
| 28 | +```hcl |
| 29 | +resource "databricks_sql_endpoint" "endpoint" { |
| 30 | + name = "Looker Serverless" |
| 31 | + # ... |
| 32 | + enable_serverless_compute = true |
| 33 | + # ... |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | +The feature was literally brand new so there were a few integration hurdles we |
| 38 | +had to work through with our colleagues at Databricks, but we got things up and |
| 39 | +running in short order. By adopting SQL Serverless, we could avoid setting up |
| 40 | +special networking, IAM roles, and other resources within our own AWS account, |
| 41 | +we can instead rely on pre-provisioned compute resources within Databricks' own |
| 42 | +infrastructure. No more headache of ensuring all of the required infra is in |
| 43 | +place and setup correctly! |
| 44 | + |
| 45 | +The switch to Serverless reduced our infra configuration and management |
| 46 | +footprint, which by itself is an improvement. We also noticed a significant |
| 47 | +reduction in cold start times for the SQL Serverless Endpoint compared to the |
| 48 | +standard SQL Endpoint. The faster start-up times meant we could configure even |
| 49 | +lower auto-terminate times on the endpoint, savings us even more on |
| 50 | +unproductive and idle cluster costs. |
| 51 | + |
| 52 | +On the Looker side there really wasn’t any difference in the connection |
| 53 | +configuration other than a URL change. In the end, after some preparation work |
| 54 | +a simple 5 minute change in Looker, and a simple 5 minute change in Terraform |
| 55 | +switched everything over to Databricks SQL Serverless, and we were ready to |
| 56 | +rock! Our BI team is very happy with the performance, especially on cold start |
| 57 | +queries. Our CFO is happy about reducing infrastructure costs. And I’m happy |
| 58 | +about simpler infrastructure! |
0 commit comments