ClickHouse: Free Open Source Real-Time Analytics at Scale
Quick Overview
The video demonstrates how to deploy and use a free, open-source ClickHouse analytical database instance on Elestio's platform, covering setup via the web UI, cost estimation, and basic SQL queries using the Tabix tool, concluding with an example of integrating ClickHouse with a Node.js application.
Key Points: The presenter deploys a ClickHouse instance using the Elestio platform, which offers managed DevOps services for deploying code and open-source software on any cloud or on-premise. The deployment process involves selecting ClickHouse from the service catalog on Elestio, choosing a cloud provider (Netcup in the demo), region (Germany/Nuremberg), and service plan (Medium-2C-4G), with an estimated starting cost around $53 per month. After deployment, the user accesses the database via the Tabix UI, creates a table using a specific engine, and inserts sample data. Basic SQL queries are executed successfully in Tabix, such as counting event types ( vs. ) and calculating average page load times per country, showcasing ClickHouse's speed. The video provides instructions for integrating ClickHouse with a Node.js application, including installing the package via npm and using connection details (host, user, password) retrieved from the Elestio email notification. The final Node.js example demonstrates connecting, creating a table, inserting data, and executing a query to retrieve page visit statistics, confirming the database is functional and fast for analytical workloads.
Context: This video serves as a tutorial demonstrating the ease of setting up and utilizing ClickHouse, a high-performance, open-source, column-oriented database ideal for real-time analytics and OLAP scenarios, specifically hosted and managed through the Elestio DevOps platform. The presenter guides viewers through the entire workflow, from initial provisioning to basic querying and back-end integration using Node.js.
Detailed Analysis
The tutorial begins by showing the Elestio platform, which offers fully managed DevOps to deploy code and open-source software. The user navigates to deploy a ClickHouse instance, selecting Netcup as the cloud provider in the Europe/Germany/Nuremberg region under the Medium-2C-4G plan, estimated at approximately $0.0192/hour or about $53 per month. Once deployed, the user accesses the service dashboard to retrieve credentials and then moves to the Tabix SQL editor. A sample web analytics table ( ) is created using the engine, populated with sample data via statements, and then queried to demonstrate performance, such as grouping page views by event type and retrieving average duration per country. The video then shifts to Node.js integration, showing the necessary steps: initializing a project with , installing the via , and updating with the connection details (host, username 'root', and password) provided in the initial setup email. The final step is running the Node.js script, which successfully executes SQL commands (table creation, data insertion, and a complex analytical query) and outputs the results, confirming the successful integration and fast query execution time (e.g., 20ms for the final query).