# Production Deployment Guide

:::tip

This guide is intended for production deployments. For testing, please see a [Quick Start](/docs/self-hosting/quick-start) guide for using Docker Compose.
Also, docker compose could serve as a reference implementation for describing how services works together.

:::

## Components and services

Jitsu consists of several components and services. The main components are:

 * **🔄 Console** is responsible for management UI. Console is written in Next.js. Resources:
  [`jitsucom/console` (docker image)](https://hub.docker.com/r/jitsucom/console),
  [source code](https://github.com/jitsucom/jitsu/console),
  [configuration reference](/docs/self-hosting/configuration#console)
 * **🕸️ Ingest** provides [events ingestion API](/docs/sending-data). Ingest is written in Go. Resources: [`jitsucom/ingest` (docker image)](https://hub.docker.com/r/jitsucom/ingest),  [source code](https://github.com/jitsucom/bulker/tree/main/ingest), [configuration reference](/docs/self-hosting/configuration#ingest)
 * **⚙️ Rotor** is responsible for running functions. Rotor is written in Node.js. Resources:
  [`jitsucom/rotor` (docker image)](https://hub.docker.com/r/jitsucom/rotor),
  [source code](https://github.com/jitsucom/jitsu/rotor),
  [configuration reference](/docs/self-hosting/configuration#rotor)
 * **🚚 Bulker** is responsible for batching and sending events to the warehouse destination. Bulker is written in Go. Resources: [`jitsucom/bulker` (docker image)](https://hub.docker.com/r/jitsucom/bulker),  [source code](https://github.com/jitsucom/bulker), [configuration reference](https://github.com/jitsucom/bulker/blob/main/.docs/server-config.md)
 * **🔌 Syncctl** is responsible for running [Jitsu Connectors](https://jitsu.com/integrations/connectors) on Kubernetes cluster. Resources:
[`jitsucom/syncctl` (docker image)](https://hub.docker.com/r/jitsucom/syncctl),
[source code](https://github.com/jitsucom/bulker/tree/main/sync-controller),
[configuration reference](/docs/self-hosting/configuration#syncctl).
   * Syncctl is *optional*. It is required only if you want to use [Jitsu Connectors](https://jitsu.com/integrations/connectors) sync feature. Otherwise, you can skip it's configuration. Please note,
 that **Syncctl requires a Kubernetes cluster to run syncs**


:::info

All Jitsu services are:
* Available as Docker images
* Stateless and can be scaled horizontally
* Are being configured with environment variables exclusively

:::


In addition to internal services, jitsu has a number of 3rd-party dependencies

* [PostgreSQL](https://www.postgresql.org/) - for configuration and metadata storage
* [Redis](https://redis.io/) is used for multiple purposes:
   * Store logs of function executions, and event cache
   * Functions state storage
* [Kafka](https://kafka.apache.org/) is a main transport layer for sending events between components
* [MongoDB](https://www.mongodb.com/) is an optional. It's required for [Persistent Storage](/docs/functions/runtime#persistent-storage) and [Identity Stitching](/docs/features/identity-stitching)


### Service Diagram

See the diagram below for a better understanding of the architecture:

<EmbeddedExcalidraw src="https://app.excalidraw.com/s/82iXP5ooHoR/6UsDkPy3EpH"  />


## Enabling Jitsu Connectors

[Jitsu Connectors](https://jitsu.com/integrations/connectors) requires Kubernetes cluster. 

**🔌 Syncctl** is the service responsible for running connectors sync jobs. It is not required to run all Jitsu component in kubernetes cluster. It is enough to have `syncctl` configured with a valid config of kubernetes cluster.

### How to enable

To enable connectors sync support, [configure](/docs/self-hosting/configuration#syncctl) `syncctl` service.

For `console` service set `SYNCS_ENABLED`, `SYNCCTL_URL` and `SYNCCTL_AUTH_KEY` env variables.

After starting all Jitsu components, you will see `Connectors` menu item in the top bar of Jitsu Console UI.

To fill connectors catalog, you need to trigger `catalog-refresh` console API endpoint in browser with authorized Jitsu user:

```
http://JITSU_PUBLIC_URL/api/admin/catalog-refresh
```

## Running Jitsu on Kubernetes cluster

It is totally possible to run all Jitsu components in Kubernetes cluster. In fact, [Jitsu Cloud](https://use.jitsu.com) is running on [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine).

There are no official Jitsu documentation or helm chart yet, but there's a community-driven helm chart available at [stafftastic/jitsu-chart](https://github.com/stafftastic/jitsu-chart)

You can also use our quick-start [docker-compose](https://github.com/jitsucom/jitsu/blob/newjitsu/docker/docker-compose.yml) 
as a reference.

## Configuration Reference

See [Configuration Reference](/docs/self-hosting/configuration) for list of all environment variables and their descriptions,
use [docker-compose](https://github.com/jitsucom/jitsu/blob/newjitsu/docker/docker-compose.yml) as a reference