3

Suppose we have 2 microservices - service A and B. These two services are independent for most parts and API client talks to them directly. However, their functionality overlaps or intersects in some areas where we need some info from service A first, then provide those info to service B to get some other info. To save API clients from multiple roundtrips for the overlapped functionalities, my team and I decided to put a new service C in front of the existing services A and B. This new service C will take care of overlapping responsibilities only.

Is this an example of facade pattern or microservice orchestrator pattern? We want to call it either X facade or X orchestrator. From the resources available on the Internet, I could not figure out. Which one is it?

Thanks in advance for your help.

2
  • 1
    From a higher-level point of view, the clients care more about it being a facade; the fact that it orchestrates something is kind of an internal detail from the perspective of the client (unless the orchestration itself is the primary service clients want). So I'd call it a facade (internally, it could have an orchestrator component, though). Commented May 1, 2021 at 11:30
  • You also have the API Gateway-pattern if all communication go thru a single service. Commented Nov 18, 2025 at 11:00

3 Answers 3

7

Facade tells me it’s a simplified interface that abstracts more complicated interfaces.

Orchestrator tells me it’s telling things what to do and expecting those things to do it.

Technically both are true. But isn’t the first one the point you’re trying to make?

However, the better name tells me what it does. Not how it does it.

0
4

Is this an example of facade pattern or microservice orchestrator pattern?

It is probably both, patterns are not mutually exclusive. But the name you pick for C should express the client-facing abstraction. To my understanding, "Orchestrator" expresses more what C does internally, and "Facade" more how the interface looks like for the client.

Hence in case it is transparent for the client that C is just a simplified interface to A and B, I guess the name "XYZfacade" will fit better. However, in case C now fulfills a purpose on its own, and in case it uses A and B internally for this purpose is just an implementation detail, I would prefer a name which expresses the purpose exclusively, without any suffix like "facade" or "orchestrator". Why not just call it "XYZ" (- not literally - assume "XYZ" describes the specific topic C deals with)?

2
  • Thanks. I liked your idea of having a different name and omitting suffix. In this case, a different name for service C is hard to find because the nature of business domain makes service A and B the core independent services. Service C is just a a front for the front-end clients (BFF pattern!). I'll think harder. Commented Apr 30, 2021 at 14:00
  • @AhmadFerdous: naming things is considered to be one of the hardest problems in CS ;-) Commented Apr 30, 2021 at 14:11
0

At work I have written an Edifact parsing and validation framework that has a bunch of classes you could use to refine how the parser behaves, what it considers as valid Edifact and what it sees as error. The setup here could potentially involve like 8 classes. That framework though also provides a single EdifactReader class that acts as a facade to hide away the complexity of configuring the parser and what not. This class will probably solve 90-95% of all Edifact parsing and validation cases users might have by configuring the most common settings for you and provide a simple List<RawSegments> segments = read(InputStream), EdifactInterchange interchange = validate(List<RawSegments>) and List<EdifactValidationIssue> issues = getValidationIssues() API interface for your convenience. The focus here is clearly on simplifying the usage of the Edifact parser and less on the orchestration itself. Hence this is a perfect example, IMO, for a facade use case.

An application I currently develop that takes care of syncing the state of various external systems like Notion based feature requests for internal projects, FeatureBase posts that express feature requests made by various departments and then Gitlab issues or epics where we developers maintain our tasks on various boards and the like, uses an orchestrator pattern to basically call the various data synchronization tasks that need to be performed between those systems. The focus here is clearly not on simplifying the API for users but to make the synchronization process more graspable and cleaner to the reader of the code and have a central location that is responsible to call the appropriate synchronization processes based on the state of those system API responses.

While both patterns clearly have some overlap, I think the focus on what the facade or what the orchestrator try to achieve are very different in nature. Given the problem statement in the OP I'd say it sounds more like an orchestration pattern to me than a real facade where you just try to simplify the API for the end users. But I like Doc Browns answer that leaving out facade or orchestrator from the name and name it such that is express what it actually does is probably the better option. You are of course free to document that class or system and explain that to a client it is more of a facade but internally it'll orchestrate processes among various systems for the convenience of simpler client interactions.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.