Harbor Desk
A helpdesk sold as a subscription to many customers. Three plans on one code base, and a rush at one customer never slows the others.
How a request flows
What it delivers
The problem
A helpdesk a company sells as a subscription to many customers. Every customer gets exactly the speed they pay for, whatever the others do.
The result
- New customers ready with one call, large customers with their own database
- Every plan gets its speed: 20, 100 or 500 requests per second
- A rush at one customer: the others keep answering in 6.3 ms
Try it yourself
Pick a customer and start a rush. The others stay fast.
Try it: follow the golden hints.
Rebuilt in the browser with the plans and measurements of the real system. The real code is on GitHub.
The setup
Small customers share one database and stay cheap. Large customers get their own.
Decisions
- 0001
Shared database for small customers, own one for enterprise
Small plans run cheaply together, large customers get performance of their own. Both with the same code.
- 0002
The rules live in the database
Every table knows its customer. New features are multi tenant from day one, with no extra work in the code.
- 0003
Customer and plan come from the login
A signed token tells every request at once who is asking and which plan applies.
- 0004
Speed per customer in memory
One counter per customer and plan catches 95.6 % of a flood before it reaches the database.
- Java 21
- Spring Boot 4
- PostgreSQL 16
- Row Level Security
- JdbcClient
- Flyway
- ArchUnit
- Terraform
- GitHub Actions