MuleSoft: Anypoint Mule Gateway vs. Anypoint Flex Gateway vs. Anypoint Service Mesh
This article provides a comparison study of three Gateway offerings from MuleSoft.
Join the DZone community and get the full member experience.
Join For FreeIn this article, I would like to do a comparison study of MuleSoft Anypoint Gateway Runtimes — Mule Gateway, Flex Gateway, and Service Mesh. I will take you through key differences and commonalities (high-level — not at code- or configuration-level) among these gateway options.
Introduction
MuleSoft offers three Gateway Runtime options for managing backend APIs (Mule or non-Mule):
- Anypoint Mule Gateway
- Anypoint Flex Gateway
- Anpoint Service Mesh
Anypoint Mule Gateway
Mule Gateway enables you to add a dedicated orchestration layer on top of your backend APIs and services (only Mule applications) to help you separate orchestration from implementation.
Anypoint Flex Gateway
Anypoint Flex Gateway is an Envoy-based, ultrafast lightweight API gateway designed to manage and secure APIs (both Mule as well as non-Mule applications) running anywhere.
Anypoint Service Mesh
Anypoint Service Mesh is an independent architecture layer encapsulated (contains Mule adapter within Istio mixer) in a Kubernetes or a Red Hat OpenShift cluster, hosting microservices-based applications (Mule or non-Mule). In the Anypoint Service Mesh architecture, a sidecar proxy is used for service-to-service communication (internal communication).
Key Differences
Functionality Scope
Mule Gateway focuses on ONLY Mule applications. They should be used for external communications — external clients who wants to excess your applications/APIs.
Flex Gateway focuses on both Mule and non-Mule applications. They should be used for external communications.
Service Mesh focuses on microservices (technology agnostic — developed using any technology/platform including Mule) within the same application. They should be used to internal communications — service-to-service communications within microservice-based applications.
Technology Stack
Mule Gateway is a Spring-based application embedded into Mule Runtime.
In Flex Gateway, underling engine is built on Envoy. Also, it uses Fluent Bit for logging.
Service Mesh uses Sidecar Proxy, which is Envoy-based, running within Istio and Kubernetes cluster (proxy run within the same pod/container group as the service hosted).
Key Capabilities
Mule Gateway
- It uses same technology as Mule applications.
- It uses Auto-discovery for binding Mule applications (basic endpoint or proxy type) with API Manager.
- Custom policies can be built using Java and Mule DSL.
- It operates in connected mode ONLY (using Anypoint Platform).
Flex Gateway
- It can be deployed as a Linux service, a Docker service, or a Kubernetes/OpenShift ingress controller.
- Custom policies are built using Envoy-provided Rust WASM SDKs.
- It can be configured in one of two ways: connected mode by using the Anypoint Platform UI, or locally (local mode) to manage APIs in private environments.
Service Mesh
- It brings complete lifecycle API management capabilities to the microservices built with Mule (deployed within CloudHub or RTF).
- The MuleSoft adapter connect K8s components to Anypoint Platform. It enables sharing of metadata about all the services that are managed by the mesh. This allows for discovery of your existing microservices as APIs into Anypoint Platform. These APIs can then be managed within API Manager.
- It operates in connected mode ONLY (using Anypoint Platform).
Use Cases
Mule Gateway: Suited for managing (securing, monitoring, etc.) Mule applications with basic endpoint or a dedicated proxy (also available as a Mule proxy application deployed in CloudHub).
Flex Gateway: Suited for managing high-availability and high-performance Mule and non-Mule applications deployed anywhere.
Service Mesh: Suited for microservices, low-level communication concerns like service discovery, service-to-service authentication, traffic encryption, traffic management, etc.
Commonalities
- All the three gateway options enable decoupling as well as abstraction. They create a separate orchestration layer (decoupling) by abstracting the underling complexities of the backends (APIs or applications or services within microservices-based applications), and hence simplifying interactions/communications (internal or external).
- Mule Gateway and Flex Gateway are for client-to-server communications. They serve as the entry point for external clients to access your applications (external communication).
- Flex Gateway and Service Mesh require management and maintenance of underlying infrastructure.
- Flex Gateway and Service Mesh support both Mule and non-Mule applications/services as backends.
- With all the three gateway options, you can add complex capability to your backends without writing any code:
- You can apply policies such as security, throttling (rate limiting), caching, etc. on your backends. These policies enable you to enforce regulations to help manage security, control traffic, and improve adaptability of your backends.
- They also enable monitoring (observability) by providing insights into how your backends are being used and how they are performing via metrics such as CPU usage, memory usage, etc.
Conclusion
This is just a small attempt to clear out the ambiguities around three gateways options — Mule Gateway, Flex Gateway, and Service Mesh — currently offered by MuleSoft.
Hope you all find this article helpful/useful in any way.
Thank you for reading!
Published at DZone with permission of PRAVEEN SUNDAR. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments