---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/cookbook/architecture
  - ru/cookbook/architecture
  - href: en/cookbook/architecture.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/cookbook/architecture.html
vcsPath: en/cookbook/architecture.md
---
# DataLens On-premises architecture

## Issues addressed by DataLens On-premises

**DataLens On-premises** is an analytical BI (business intelligence) platform you can deploy as a distribution package in your infrastructure, either in a cloud or a local server.

DataLens is designed as as a _smart_ visualizer which **does not store the analyzed data**.

DataLens works on a **push-down** principle:

1. A user opens a dashboard.

1. Based on the chart settings, the system generates SQL queries or API requests.

1. Queries go directly to data sources (PostgreSQL, ClickHouse®, Greenplum®).

1. The source runs the query and returns the aggregated result for visualization.

1. The data is visualized as charts and tables, which you can download as a PDF report.


In its PostgreSQL service database, DataLens only stores metadata: information about connections (as plain text, no passwords), datasets, charts, and dashboards.

## How business users interact with DataLens

Here is the typical user flow:

1. **Creating a connection.** The user specifies credentials to access the data source.


1. **Creating a dataset.** The user describes the data model: selects tables, configures links between them, and creates calculated fields.


1. **Creating a chart.** Based on the dataset, the used renders a visualization via a dedicated interface (wizard or QL).


1. **Building a dashboard.** The user places several charts on one page, adds filters (selectors) and configures links between them.


## Under the hood: Key components

DataLens On-premises consists of multiple Docker containers, i.e., isolated application runtime environments. The latter contain everything the apps need to operate: code, libraries, dependencies, configuration, and file system. Containers are orchestrated by Kubernetes®, a software that automates the deployment and scaling of containerized applications and their management within a cluster.

Here is a list of key services available after the installation:

* **Auth**: Authentication service that manages user access.
* **UI**: Frontend service that renders the UI to the browser. This is what the user directly interacts with.
* **Control API**: Backend service that manages connections and datasets.
* **Data API**: Backend service that handles requests from charts, generates data source query code, and proxies its execution. This is one of the most resource-heavy components.
* **United Storage (US)**: Metadata storage service. Responsible for all system objects: dashboards, charts, folders and access permissions to them. Runs on top of PostgreSQL.


## Summary

We have covered the basic principles of the DataLens On-premises architecture. As you now know, DataLens Enterprise requests data but does not store it. You have explored the DataLens key components and the typical user flow.
