Microservices Decision Framework for UK Regulated Software
| Factor | Modular Monolith | Microservices | Guidance |
|---|---|---|---|
| Team size | < 20 engineers | 20+ engineers (team per service) | Conway Law: team structure drives architecture |
| NHS DTAC evidence | 1 DTAC submission for entire product | 1 DTAC submission per service | Monolith simpler for DTAC -- fewer pen tests |
| FCA PS21/3 IBS mapping | Simple: service = IBS | Complex: IBS spans multiple services | Monolith makes IBS boundary clear |
| Development velocity | BEST -- no network latency, shared types | Slower -- network calls, distributed tracing | Monolith faster for early stage |
| Independent scaling | Service scales as one unit | BEST -- scale payment service 10x, reporting 1x | Use microservices only when scaling differs materially |
| Data isolation (NHS multi-tenant) | PostgreSQL RLS -- all data in one DB | Separate DB per service -- more operational overhead | RLS monolith is simpler for NHS multi-tenant |
| Deployment complexity | Single CDK stack, one pipeline | One pipeline per service (12+ for complex systems) | Microservices multiply DevOps overhead |
| ClickMasters default | Most UK regulated products (< 20 engineers) | NHS spine integration services, payment processing isolation | Start monolith, extract services when pain is real |
Event-Driven Architecture for UK Regulated Systems
ClickMasters EDA rule: async for background, sync for clinical and payment. The temptation to make everything event-driven is strong. The FCA PS21/3 and NHS DTAC compliance complexity of async IBS processing is not worth it.