⚙️ Architecture
Zynka ONE is built for high throughput and reliability. It uses a microservices architecture on Azure to ingest OCPI data, perform stream processing and expose APIs. The diagram below shows the main building blocks.
High‑level architecture
- Edge Service (AKS – Node.js/TypeScript) – Implements all
/ocpi/2.2.1/*endpoints. It validates headers and OCPI tokens and publishes a normalised envelope for each event (session update, EVSE status, CDR) to Azure Event Hub. Each envelope contains a timestamp, tenant identifier, module and payload, and a hash for integrity checking. - Streaming (Azure Event Hub) – Buffers OCPI events with a partition key of
${tenantId}|${entityId}to preserve ordering. A consumer group in Fabric RTI picks up these events in near real‑time. - Microsoft Fabric RTI – Eventstream ingests the envelopes, transforms them (e.g. flattening JSON) and writes them into Eventhouse tables. Materialised views written in Kusto Query Language (KQL) summarise current EVSE status, active sessions and rolling metrics. Activator rules trigger alerts or call a finite‑state machine when anomalies occur.
- Operational Database (Azure PostgreSQL) – Stores static metadata such as partner registry, credential tokens, location and tariff definitions.
- Payment & Analytics – For Direct Payment flows, the Edge service communicates with payment terminals and UPI. After a charging session, Zynka receives a financial advice confirmation and pushes CDRs downstream. Real‑time analytics dashboards pull from Eventhouse to display current utilisation, revenue and charger health.
Envelope schema
Every event published by the Edge service conforms to a common envelope. This makes it easy for downstream pipelines to handle heterogeneous OCPI payloads.
{
"ts_utc": "2025-01-01T12:00:00Z",
"tenantId": "INZYN",
"module": "evse_status",
"entityId": "IN*ZYN*E000001",
"x_request_id": "uuid",
"x_correlation_id": "uuid",
"schema_version": "1.0",
"payload": { /* OCPI object */ },
"hash": "sha256:<digest>"
}
Partitioning on tenantId|entityId ensures that updates to the same EVSE are ordered.
Kubernetes deployment
The Edge service runs in an AKS deployment with multiple replicas. Horizontal Pod Autoscaling (HPA) and KEDA can adjust capacity based on CPU and queue length. Pods authenticate to Event Hub and other Azure services using managed identities.
For reference, a simplified deployment manifest looks like this:
apiVersion: apps/v1
kind: Deployment
metadata:
name: ocpi-edge
spec:
replicas: 3
template:
spec:
serviceAccountName: ocpi-sa
containers:
- name: ocpi-edge
image: zynka.azurecr.io/ocpi-edge:1.0.0
env:
- name: EVENT_HUB_NAME
value: "ocpi-events"
- name: EVENT_HUB_CONNECTION
valueFrom:
secretKeyRef:
name: eventhub-secret
key: connectionString
In the following sections we will explore how to onboard as a CPO/eMSP and how to model your locations, tariffs and sessions.