Deployment Models
SaaS + On-Premise
Infrastructure, deployment, scalability, security, and operational requirements for LedgerFlow SaaS and on-premise deployments.
LedgerFlow supports both SaaS (cloud-hosted) and on-premise deployments from a single codebase. Multi-tenancy is achieved via row-level security or schema isolation for large tenants.
| Model | Description | Tenancy | Scaling |
|---|---|---|---|
| SaaS (Default) | Cloud-hosted, fully managed | Shared database with row-level isolation | Horizontal (stateless API, read replicas) |
| Dedicated SaaS | Large tenant on separate infra | Dedicated database schema or instance | Vertical + horizontal scaling |
| On-Premise | Self-hosted, customer-managed | Single-tenant or private multi-tenant | Customer-controlled |
| Entity | Typical Growth | Index Strategy |
|---|---|---|
| Vouchers (annual) | 10K-50K per small company | Index on date, type, status, company_id |
| Ledger Entries (annual) | 50K-200K per company | Composite (company_id, ledger_id, date) |
| Stock Movements | 5K-20K per year | Index on item_id, godown_id, date |
| Audit Log (annual) | 200K-500K events | Partition by month on created_at |
Standard reports (P&L, Balance Sheet) for a year of data must complete in under 3 seconds. Use materialized views for common aggregations; invalidate nightly or on key posting events.
| Component | Scaling Method | Limit/Notes |
|---|---|---|
| API Servers | Kubernetes HPA (CPU/memory-based) | Min 3, max 100 replicas per phase |
| Worker Nodes | Separate worker pods, job queue-based | Scale independently of API |
| Database Read Replicas | Stream replication; manual promotion | Up to 10 replicas; route reports to read replicas |
| Cache (Redis) | Cluster mode or sentinel HA | Separate cache per large tenant if needed |
| Object Storage | S3/GCS auto-scaling | Unlimited; object lifecycle policies for archives |