Scrivio Interview library
LeadershipPrincipal7 min read · updated 12 November 2026

Enterprise service buses acted as company-wide mediators that routed, transformed and orchestrated messages, and many organisations later moved away from them. What lessons apply to central orchestration components such as API gateways and workflow engines today?

Enterprise service buses failed mainly because business logic moved into a central component owned by one integration team, which then became a bottleneck for every change, a single point of failure and a platform nobody dared to upgrade. The lesson for API gateways and workflow engines is to keep business rules in the services that own them and let central components handle routing, security and protocol concerns. Where orchestration has to be central, each team should own its own workflows on the shared engine, and the central components need regular reviews for logic that has crept in.

Background to this question

Every generation of architecture rediscovers the appeal of a central mediator. In the 2000s it was the enterprise service bus, or ESB, a middleware product that sat between all systems and routed, transformed and orchestrated their messages. Today we have API gateways, service meshes and workflow engines such as Camunda or Temporal, and each can drift into the same role. A senior engineer is asked this question because they decide what such components are allowed to do, and the decision shapes team autonomy for years. In this answer, we will recap what an ESB did and why it seemed attractive, look at the two failures it produced, and then turn those lessons into concrete rules for gateways and workflow engines.

1A Quick Recap of the ESB Idea

An ESB was the mediator pattern applied to a whole company. Instead of every system integrating with every other system, each system connected once to the bus. The bus then did three kinds of work. Routing decided where a message went, for example an order to the warehouse system in its region. Transformation converted formats, such as a SOAP message from one system into a flat file for another. Orchestration ran multi-step processes, such as calling credit check, then inventory, then billing, with rules about what to do when a step failed.

The promise was real. Connections dropped from many-to-many to one per system, integration skills were concentrated in one team, and the company got one place to see all flows. The trouble came from the third kind of work, and from who owned it.

2Failure One: Business Logic With a Single Owner

Orchestration and transformation are rarely neutral. To route orders by region, the bus must know what a region is. To transform a customer record, it must decide which fields matter and what a missing value means. To orchestrate an order, it must know the rules: skip the credit check for existing customers under 500 euros, retry billing three times, cancel the reservation if billing fails. Bit by bit, the rules of the business moved into flows on the bus, written in a vendor's graphical tool or XML, and owned by the integration team.

So every change to an order rule needed that team. A product team that wanted to add a field to an order now had to change its own service, wait for an integration ticket, and then coordinate a release. With 20 product teams and one integration team of eight people, the queue grew to weeks. The mediator had removed technical coupling between systems and replaced it with organisational coupling to one team, which is much harder to scale.

3Failure Two: A Single Point of Failure Nobody Could Upgrade

Because all traffic crossed the bus, an outage of the bus was an outage of everything, and a slow transformation for one flow could exhaust threads shared by all flows. Upgrading the product was even worse. A new version of the bus software had to be tested against every flow in the company, hundreds of them, many written years earlier by people who had left. So upgrades were postponed, the platform fell further behind, and the cost of the eventual upgrade grew each year. Many organisations moved away from ESBs not because routing was a bad idea but because these two failures made change slow and risky.

4What Belongs in a Central Component Today

The modern lesson is often summarised as smart endpoints and dumb pipes: the services hold the logic, and the infrastructure between them only moves messages. For an API gateway, the reasonable jobs are cross-cutting and protocol concerns that are the same for every service: TLS termination, authentication and token validation, rate limiting, request routing by path or host, request size limits, and observability such as access logs and trace headers. These have one owner naturally, the platform team, and they change rarely.

Step throughWhere each concern lives
  1. API gatewayTLS, authentication, rate limits, routing, size limits
  2. Service mesh or HTTP clienttimeouts, retries, mutual TLS, load balancing
  3. Workflow enginedurable state and timers; each team owns its workflow code
  4. Owning servicebusiness rules, validation, data transformation for its domain
  5. Owning databasethe service's data, never shared through the central layer

5 layers, from the top down. Step through them one at a time.

Central layers carry protocol and reliability concerns; domain knowledge lives with its owner.

The jobs that should stay out are anything that needs knowledge of a domain. A gateway script that waives the rate limit for premium customers, merges two backend responses into a new shape, or rejects orders above a credit limit has become a small ESB. The test is simple: if changing a rule would require a product decision, the rule belongs to the team that owns that product, in its service.

5Workflow Engines Without Recreating the Bus

Some processes really do need central orchestration: a loan application that waits days for documents, or an order saga that must compensate when a step fails. A workflow engine gives durable state, timers and retries that would be painful to build in each service. The ESB lesson here is about ownership rather than technology. The engine should be a shared platform, run by a platform team, while each workflow definition is code owned and deployed by the product team whose process it is. The order team owns the order workflow in its own repository, tests it with its own pipeline and releases it on its own schedule.

Engines that run workflows as ordinary code, such as Temporal with its Java SDK, make this easy, because each team runs its own workers. Engines with a central model repository can achieve the same with per-team namespaces and deployment rights. What we must avoid is one central team writing everyone's workflows, which is exactly the ESB integration team under a new name.

6Keeping Central Components Honest Over Time

Logic creeps in gradually, usually under deadline pressure: a quick header rewrite here, a special case for one partner there. So the rules need maintenance, not just a launch announcement. Configuration for gateways should be code in a reviewed repository, with the platform team reviewing every change for domain knowledge. A short regular review, for example each quarter, can list every route-specific script or transformation and ask whether it should move to its owning service. Measuring helps too: the number of custom scripts per route, and the number of product releases that needed a gateway change, are early warnings that the central component is becoming a bottleneck again.

7Follow-up questions

Is a backend for frontend an example of logic creeping into the edge?

Not if it is owned correctly. A backend for frontend is a service that shapes data for one client, such as the mobile app, and it should be owned by the team that builds that client. It contains presentation logic for one consumer, not shared business rules, and it is deployed independently. It becomes a problem when one central team builds BFFs for everyone.

Should a gateway ever transform payloads?

Protocol-level transformation is fine, such as translating gRPC to JSON or adding standard headers. Domain transformation, such as renaming fields or merging resources, belongs in the services. The first is the same for every service and has one natural owner; the second needs domain knowledge and changes with the product.

How do you argue against adding logic to the gateway when it is the fastest fix?

By making the cost visible: the rule will be owned by a team that does not understand it, tested apart from the service it affects, and forgotten when the service changes. Often the right compromise is to accept a temporary gateway rule with an expiry date and a ticket for the owning team to move it.

8Conclusion

In this answer, we saw that ESBs were company-wide mediators whose routing and transformation were useful but whose orchestration pulled business logic into one team, creating a bottleneck for every change, a single point of failure and a platform that could not be upgraded. For API gateways the rule is to handle routing, security and protocol concerns while business rules stay in the owning services. For workflow engines, the engine is shared but each team owns its workflows, and both kinds of central component need regular reviews to catch logic that has crept in.

What to say in the interviewAbout 80 seconds aloud

Open with

The ESB lesson for me is less about technology and more about ownership. An ESB was a mediator for the whole company: it routed, transformed and orchestrated messages.

Then, if they want more

Routing was fine, but transformation and orchestration need business knowledge, so business rules gradually moved into flows owned by one integration team. Every product change then needed that team, and with twenty product teams and one integration team, that became the bottleneck.

The bus also became a single point of failure, and because every flow ran on it, upgrades were so risky they kept getting postponed. So with API gateways I keep the gateway to concerns that are the same for every service: TLS, authentication, rate limits, routing, size limits and observability.

If a rule needs a product decision, like special treatment for premium customers or merging responses, it belongs in the owning service. With workflow engines, some central orchestration is legitimate, for long-running processes and sagas, but the engine is the shared platform while each team owns and deploys its own workflows in its own repository.

And because logic creeps in under deadline pressure, I keep gateway configuration as reviewed code and run a regular review of route-specific scripts to move them back to their owners.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Enterprise service buses acted as company-wide mediators that routed, transformed and...": https://scrivio-interview-library.netlify.app/java/behavioral-patterns/2415e15fe6/