Usage & Enterprise Capabilities
Key Benefits
- Self-Service Analytics: Empower every team member to explore data without writing code.
- Data Governance: Control access with row-level permissions and data sandboxing.
- Embedded Analytics: Seamlessly integrate charts and dashboards into internal tools.
- Cost-Effective: Eliminate per-user fees associated with commercial BI tools.
- Open & Extensible: Full visibility into the codebase and ability to customize.
Production Architecture Overview
- Metabase Application: The Java-based application server (JAR file).
- Application Database: PostgreSQL or MySQL for storing Metabase's application data (questions, dashboards, users).
- Data Sources: Your production databases (e.g., PostgreSQL, Snowflake, BigQuery) that Metabase queries.
- Caching Layer: (Optional) Redis or Memcached for improving dashboard performance.
- NGINX / Caddy: A reverse proxy for SSL/TLS termination and load balancing.
Implementation Blueprint
Implementation Blueprint
Prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start dockerDocker Compose Production Setup
version: '3'
services:
metabase:
image: metabase/metabase:latest
container_name: metabase
ports:
- "3000:3000"
environment:
- MB_DB_TYPE=postgres
- MB_DB_DBNAME=metabase
- MB_DB_PORT=5432
- MB_DB_USER=metabase
- MB_DB_PASS=your_secure_password
- MB_DB_HOST=postgres
depends_on:
- postgres
volumes:
- metabase-data:/metabase-data
restart: always
postgres:
image: postgres:13
container_name: postgres
environment:
- POSTGRES_USER=metabase
- POSTGRES_PASSWORD=your_secure_password
- POSTGRES_DB=metabase
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
- postgres-data:/var/lib/postgresql/data
restart: always
volumes:
metabase-data:
postgres-data:Kubernetes Production Deployment (Recommended)
apiVersion: apps/v1
kind: Deployment
metadata:
name: metabase
spec:
replicas: 2
selector:
matchLabels:
app: metabase
template:
metadata:
labels:
app: metabase
spec:
containers:
- name: metabase
image: metabase/metabase:latest
env:
- name: MB_DB_TYPE
value: postgres
- name: MB_DB_DBNAME
value: metabase
- name: MB_DB_PORT
value: "5432"
- name: MB_DB_USER
valueFrom:
secretKeyRef:
name: metabase-secrets
key: db-user
- name: MB_DB_PASS
valueFrom:
secretKeyRef:
name: metabase-secrets
key: db-password
- name: MB_DB_HOST
value: "your-production-postgres-host"
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: metabase-service
spec:
selector:
app: metabase
ports:
- protocol: TCP
port: 80
targetPort: 3000- High Availability: Run multiple replicas to ensure the analytics platform is always accessible.
- Resource Management: Efficiently allocate CPU and memory based on user load.
- Simplified Updates: Roll out new versions with zero-downtime deployment strategies.
- Externalized State: Use a managed cloud database (e.g., Cloud SQL, RDS) for the application database for reliability.
Scaling Strategy
- Application Database: Use a high-availability PostgreSQL setup (e.g., with replication) for the Metabase application database.
- Query Caching: Enable and tune Metabase's query caching to database or Redis to speed up frequent dashboard loads.
- Read Replicas: Connect Metabase to read replicas of your production databases to avoid impacting primary OLTP workloads.
- Embedding Cache: For embedded analytics, use Metabase's static embedding with signed URLs for optimal performance.
Backup & Safety
- Application Database Backups: Automate daily backups of the PostgreSQL database storing Metabase's application data (questions, dashboards, users).
- Configuration Backups: Export your Metabase configuration and user settings periodically.
- HTTPS Enforcement: Always run Metabase behind a reverse proxy (like NGINX) with a valid SSL certificate.
- Network Security: Restrict direct database access from Metabase using firewall rules and database user permissions with least-privilege access.
- Audit Logs: Regularly review Metabase's built-in audit logs to monitor data access and usage patterns.
Recommended Hosting for Metabase
For systems like Metabase, we recommend high-performance VPS hosting. Hostinger offers dedicated setups for open-source tools with one-click installer scripts and 24/7 priority support.
Get Started on HostingerExplore Alternative Tools Infrastructure
Kubernetes
Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.
Supabase
Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.