What is an Anti-Corruption Layer in Domain-Driven Design, and when would you use one between services?
Last updated
An Anti-Corruption Layer (ACL) is a translation layer (adapters, translators, facades) that converts an external system's model into your bounded context's model so foreign concepts don't leak in.
Use it when integrating legacy systems, third-party APIs, or unstable/misaligned services from other teams, and during strangler-fig migrations.
It adds code and translation cost but contains change: when the external model shifts, only the ACL needs updating.
- https://dev.to/islem_traikia_dz/the-simple-path-to-domain-driven-design-understanding-ddd-in-4-steps-md0
- https://naveen-metta.medium.com/anti-corruption-layer-design-pattern-in-microservices-using-spring-boot-dc59f26d0ca6
- https://learn.microsoft.com/en-us/azure/architecture/microservices/model/domain-analysis