Basics of server-side composition
A server-side composition implementing micro frontends requires a central point in the backend where the micro frontends are resolved and merged. The basic principle is shown in the following diagram:
Figure 7.1 – The idea behind server-side composition – a central server joins the different frontend fragments
The idea outlined in Figure 7.1 is that the communication from the client is never directly targeted to the micro frontends. Instead, a reverse proxy is acting as a man-in-the-middle – forwarding the requests to the correct micro frontends, as well as merging the responses together to form single HTML pages that can be directly evaluated in the client.
Using this pattern, teams will either go for full pages or just individual fragments. Fragments can be as large as fully composed parts of a page or as small as UI components with some domain logic.
As mentioned, the reverse proxy essentially...