Integration spaghetti
At a glance
Section titled “At a glance”| Aspect | Aspect |
|---|---|
| Typical organization | Any company with a CRM, an ERP, an e-commerce platform, a data warehouse and a decade of projects that each added their own connections |
| Symptoms | Hundreds of undocumented connections; changes break distant systems; the same data copied many ways |
| Root cause | Each project integrated directly with whatever it needed, with no shared approach |
| Usual fix | APIs for requests, events for changes, one platform to run them, and owners for every interface |
| Patterns | API-led connectivity, messaging, event-driven |
Sound familiar?
Section titled “Sound familiar?”- Changing a field in the CRM breaks an invoice job nobody remembered existed.
- There are nightly file transfers, direct database links, web services and spreadsheets, all doing similar things.
- Nobody can draw the full integration map.
- Replacing any system is a huge project because of everything wired into it.
- When data is wrong, it takes days to find which connection changed it.
Why it happens
Section titled “Why it happens”Connecting two systems directly is the fastest way to finish one project. Repeated over years, the number of connections grows much faster than the number of systems: with n systems, there can be up to n × (n − 1) / 2 pairs. Each connection has its own format, schedule and error handling, and usually no owner once the project ends.
Your options
Section titled “Your options”| Option | When it fits | Cost and risk |
|---|---|---|
| Document and own what exists | Always a first step | Low. Makes the problem visible |
| APIs for requests (API-led connectivity) | Systems ask each other for data or actions | Medium. Needs API design and versioning discipline |
| Events for changes (publish and subscribe) | Several systems need to know when something changes | Medium. Needs a broker and event ownership |
| Central integration platform or service bus | Many legacy protocols to translate | Medium to high. Risk of a central team becoming a bottleneck |
| Leave it | Rarely; only for systems about to be retired | Grows worse with every new system |
A proven approach
Section titled “A proven approach”- Inventory the connections, with owner, data, direction, schedule and failure handling for each. This alone usually turns up dead or duplicated ones.
- Agree two default patterns: an API when one system needs an answer now, an event when others need to know something happened.
- Wrap each core system once, with a system API or an event publisher, so consumers stop connecting to its database or files.
- Move the busiest and most fragile connections first, one at a time, running old and new in parallel until the new one is proven.
- Make every interface owned and versioned, with a catalog people can search before building something new.
- Requests that need an answer now go through APIs behind a gateway.
- Systems publish events when something changes, such as an order or a customer update.
- Any system that cares subscribes; the publisher doesn't need to know who.
Trade-offs and what to watch
Section titled “Trade-offs and what to watch”- Events make flows harder to follow. Invest in tracing and an event catalog, or debugging gets harder.
- A central integration team can become a bottleneck. Provide the platform centrally, but let product teams own their APIs and events.
- Migration takes years. Prioritize by pain, not by completeness.
How you’ll know it worked
Section titled “How you’ll know it worked”The number of direct connections falls each quarter, new integrations reuse existing APIs and events, and incidents caused by an upstream change become rare.
Seen in the real world
Section titled “Seen in the real world”- LinkedIn replaced point-to-point pipelines with one shared log, Kafka.
- Uber put a single gateway in front of each group of services.
Related on ArchitectureCompass
Section titled “Related on ArchitectureCompass”Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.