The Meshcaline Proxy addresses the challenges introduced by distributed microservice architectures and offers an alternative to backend-for-frontend (BFF) architectures, which come with their own complexities.
Initially, web service APIs were built as monoliths, where a single system handled all business logic and provided individual endpoints for specific processes requested by their client applications.
These monoliths contained all the necessary capabilities to implement their business processes.
However, as businesses grew and processes became more complex, these monoliths became difficult to maintain, modify, and scale.
The microservice architecture addresses monolithic limitations. Instead of a single, complex system, business processes are broken down into self-contained microservices, each responsible for a specific function. This results in:
However, a major drawback: client applications now have to handle service orchestration.
In a microservice-based system, client applications must compose multiple service calls to implement a business process. While developers are capable of handling this orchestration, it introduces significant performance issues, particularly for mobile applications.
In a monolithic system, a client might only need one or a few requests to the backend. In contrast, microservice-based architectures require dozens of requests, many dependent on previous responses. Given that these requests travel over the public internet, especially on mobile networks, latency becomes the main bottleneck rather than server processing times.
Network latency is a fundamental limitation of physics. The speed of light defines the upper limit – for instance, it takes approximately 100ms to transfer a single bit between Frankfurt and New York. No server optimization can overcome this physical constraint.
Microservices are often designed for broader business domains, not just a single client use case. As a result, they tend to return more data than needed in a specific context, wasting bandwidth and further increasing latency.
To mitigate these issues, the Backend-For-Frontend (BFF) pattern emerged. A BFF service sits between the client and microservices, handling orchestration and filtering unnecessary data. Because BFFs are usually hosted close to microservices, they significantly reduce network latency.
While BFFs solve latency and over-fetching problems, they introduce new challenges:
GraphQL, becoming popular around 2015, allows to address some of the BFF limitations by allowing clients to query only the data they need using a standardized query language. However, it comes with its own drawbacks:
The Meshcaline Proxy provides a flexible and scalable alternative to BFFs by acting as a lightweight orchestration layer rather than a separate API.
Instead of a dedicated service maintained by a separate team, Meshcaline Proxy is a generic infrastructure component that:
Unlike GraphQL, Meshcaline Proxy does not enforce data model transformations, allowing microservices to evolve independently while still optimizing client responses.
Not necessarily, but Meshcaline Proxy eliminates the need for many BFF use cases.
When BFFs are used for business logic separation, they remain valuable. However, if the main reason for a BFF is reducing latency and optimizing client requests, Meshcaline Proxy is a more efficient and scalable alternative.
Even in cases where a BFF is needed, Meshcaline Proxy can enhance its capabilities:
Meshcaline Proxy can orchestrate calls to external services beyond microservices within a company. For example:
Because the proxy operates on a high-speed data center network, it can complete this task much faster than a client device, reducing latency.
Webservice API that follow the Meshcaline hypertext-control design are implicitly supported and dramatically simplify the orchestration instructions that the client has to send. Rather then being forced to specify how to construct a subrequest given the information returned in the previous response, the client just has to indicate which hypertext controls to follow and the proxy will construct the subrequest automatically.
The move from monolithic to microservices architectures introduced new challenges in client-side orchestration and performance optimization. While BFFs emerged as a solution, they introduced bottlenecks and rigid dependencies.
Meshcaline Proxy provides a lightweight, flexible, and scalable alternative, allowing client applications to efficiently compose microservices without the downsides of traditional BFF architectures.