# scality/zenko architecture

> Architecture diagram of the GitHub repository scality/zenko, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/scality/zenko
- Repository: https://github.com/scality/zenko

## Overview

##### High-Level Components

a) Frontend Layer:
- NGINX (Load Balancer/Reverse Proxy)
- Shell UI (Management Interface)

b) Core Services:
- Zenko CloudServer (S3-compatible API)
- Backbeat (Async Replication Engine)
- Cosmos (Management API)

c) Data Layer:
- MongoDB (Metadata Store)
- Redis-Sentinel (Caching/State Management)
- Kafka (Message Queue)
- ZooKeeper (Distributed Coordination)

d) External Integrations:
- AWS S3
- Azure Blob Storage
- Google Cloud Storage
- Local Storage (Docker/RING)

##### Component Relationships

- API calls with different line styles
- Replication paths through Backbeat
- Authentication flows

##### Kubernetes Infrastructure Layer

Underlying platform:
- Kubernetes Cluster
- Helm deployment components
- Storage volumes
- Network policies

##### Additional Details

Annotations for:
- Service ports
- Authentication mechanisms
- Scaling components
- High availability pairs
- Monitoring points (Prometheus/Grafana)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef frontend fill:#B3E5FC,stroke:#0288D1
    classDef core fill:#90CAF9,stroke:#1976D2
    classDef data fill:#A5D6A7,stroke:#388E3C
    classDef external fill:#FFCC80,stroke:#F57C00
    classDef infra fill:#E0E0E0,stroke:#616161
    
    %% Client/API Layer
    NGINX["NGINX Load Balancer"]:::infra
    ShellUI["Shell UI"]:::frontend
    click ShellUI "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/xdm_ui.rst"

    %% Core Services Layer
    subgraph CoreServices
        CloudServer["CloudServer (S3 API)"]:::core
        Backbeat["Backbeat Engine"]:::core
        Cosmos["Cosmos API"]:::core
        BlobServer["Blob Server"]:::core
    end
    click CloudServer "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/CloudServer.rst"
    click Backbeat "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/Backbeat.rst"
    click Cosmos "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/Cosmos.rst"
    click BlobServer "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/Blobserver.rst"

    %% Data Layer
    subgraph DataStores
        MongoDB[(MongoDB)]:::data
        Redis[(Redis-Sentinel)]:::data
        Kafka[(Kafka)]:::data
        ZooKeeper[(ZooKeeper)]:::data
    end
    click MongoDB "https://github.com/scality/zenko/tree/development/2.10/solution-base/mongodb/"
    click Redis "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/Redis-Sentinel.rst"
    click Kafka "https://github.com/scality/zenko/tree/development/2.10/solution/kafka/"
    click ZooKeeper "https://github.com/scality/zenko/blob/development/2.10/docs/docsource/introduction/architecture/ZooKeeper.rst"

    %% External Services Layer
    subgraph ExternalServices
        AWS["AWS S3"]:::external
        Azure["Azure Blob"]:::external
        GCP["Google Cloud"]:::external
        LocalStorage["Local Storage"]:::external
    end
    click AWS "https://github.com/scality/zenko/tree/development/2.10/.github/scripts/mocks/aws/"
    click Azure "https://github.com/scality/zenko/tree/development/2.10/.github/scripts/mocks/azure/"

    %% Monitoring
    Monitor["Prometheus/Grafana"]:::infra
    click Monitor "https://github.com/scality/zenko/tree/development/2.10/monitoring/"

    %% Relationships
    NGINX --> ShellUI
    NGINX --> CloudServer
    NGINX --> Cosmos
    ShellUI --> Cosmos
    CloudServer --> MongoDB
    CloudServer --> Redis
    Backbeat --> Kafka
    Backbeat --> ZooKeeper
    Cosmos --> MongoDB
    
    %% External Connections
    CloudServer --> AWS
    CloudServer --> Azure
    CloudServer --> GCP
    CloudServer --> LocalStorage
    
    %% Monitoring Connections
    Monitor -.-> CloudServer
    Monitor -.-> Backbeat
    Monitor -.-> Cosmos
    Monitor -.-> DataStores

    %% Legend
    subgraph Legend
        Frontend["Frontend Components"]:::frontend
        CoreComp["Core Services"]:::core
        DataComp["Data Stores"]:::data
        ExtComp["External Services"]:::external
        InfraComp["Infrastructure"]:::infra
    end
```
