Skip to main content

smpp-connector — Deployment Topology

Status: populated | Last updated: 2026-04-18

1. Deployment Model

smpp-connector can be deployed in two topologies:

Option A (current): Single Deployment manages connections to all assigned operators via an in-process session map. Operator assignment is via OPERATOR_IDS environment variable.

Option B (future): One Deployment per operator for complete isolation. Chosen when operator TPS requirements or failure domains require strict separation.

The initial production deployment uses Option A with 2 replicas.

Note: Only one replica per operator maintains an active SMPP session at a time. The second replica acts as a hot standby. NATS consumer group ensures messages are only processed by the active session holder.


2. Kubernetes Resources

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
name: smpp-connector
namespace: sms-gateway
labels:
app: smpp-connector
spec:
replicas: 2
selector:
matchLabels:
app: smpp-connector
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: smpp-connector
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "3001"
spec:
serviceAccountName: smpp-connector
containers:
- name: smpp-connector
image: ghcr.io/ghasitech/smpp-connector:1.0.0
ports:
- containerPort: 3001
name: http-mgmt
env:
- name: OPERATOR_IDS
valueFrom:
configMapKeyRef:
name: smpp-connector-config
key: operator-ids
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: smpp-connector-secrets
key: database-url
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: smpp-connector-secrets
key: redis-url
- name: NATS_URL
value: "nats://nats.sms-gateway.svc.cluster.local:4222"
- name: OPERATOR_MGMT_URL
value: "https://operator-management-service.sms-gateway.svc.cluster.local:3000"
- name: LOG_LEVEL
value: "info"
volumeMounts:
- name: nats-creds
mountPath: /run/secrets/nats
readOnly: true
- name: tls-certs
mountPath: /run/secrets/tls
readOnly: true
resources:
requests:
cpu: "500m"
memory: "512Mi"
limits:
cpu: "2000m"
memory: "1Gi"
livenessProbe:
httpGet:
path: /health
port: 3001
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /ready
port: 3001
initialDelaySeconds: 10
periodSeconds: 15
volumes:
- name: nats-creds
secret:
secretName: smpp-connector-nats-creds
- name: tls-certs
secret:
secretName: smpp-connector-tls

3. Network Topology

[NATS JetStream] ──► smpp-connector (consumer: smpp.operator.*)
◄── smpp-connector (publisher: sms.dlr.inbound, operator.health)

[smpp-connector] ──────── TCP :2775 ──────────► [MNO SMPP Server]
(egress whitelisted in NetworkPolicy + MNO firewall)

[smpp-connector] ── HTTPS :3000 ──► [operator-management-service] (credentials fetch)
[smpp-connector] ── TCP :5432 ──► [PostgreSQL smpp schema]
[smpp-connector] ── TCP :6379 ──► [Redis TPS counters]

smpp-connector has no inbound TCP ports except port 3001 (management) accessible only from Prometheus within the cluster.


4. Environments

EnvironmentReplicasSMPP Target
development1Local mock SMPP server (Docker Compose)
staging1MNO staging/test SMPP endpoint
production2 (active+standby per operator group)MNO production SMPP endpoint