Case Router

A multi-tenant service that routes customer support cases to the right queue, sets a response deadline, limits how many requests each customer org can make, and reports its own health as Prometheus metrics. Python, FastAPI, and SQL. Version 1.0.0.

Tests173of 173 passed
Coverage100%of lines, 100% of branches
Mutation testing92%793 of 862 code changes caught
Load testPASS2,000 requests from 4 tenants

How a case is routed

Each org stores its own ordered rules in SQL. The first rule that matches picks the queue. These are the demo rules for the Acme tenant:

OrderKindMatchesQueue
1priorityCRITICALEscalations
2keywordrefund, invoice, charge, billingBilling
3tierPREMIUMPremium Support
4channelPHONEPhone Desk
5any(always)General Support

A critical case about a refund goes to Escalations, because the priority rule comes first. Change the order and the same case goes to Billing.

Latest load test

requests     2000 from 4 tenants
concurrency  20
throughput   339 requests/second
latency ms   p50 17.6  p95 239.5  p99 740.6  max 1644.0
statuses     {201: 2000}
stored       {'load-1': 500, 'load-2': 500, 'load-3': 500, 'load-4': 500}
result       PASS