Anypoint Platform Gateways Overview | MuleSoft Documentation
# Anypoint Platform Gateways Overview
An API gateway is an intermediary between a client application and a set of microservices or backend APIs. Responsibilities include request routing, rate limiting, caching, authentication, authorization, security, monitoring, and logging.
A gateway enables you to add a dedicated orchestration layer on top of your backend APIs and services to help you separate orchestration from implementation.
Anypoint Platform offers two gateway products for managing and securing your APIs:
  * Anypoint Flex Gateway
  * Anypoint Mule Gateway


## Anypoint Flex Gateway
Anypoint Flex Gateway is an Envoy-based, ultrafast lightweight API gateway designed to manage and secure APIs running anywhere. Built to seamlessly integrate with DevOps and CI/CD workflows, Anypoint Flex Gateway delivers the performance required for the most demanding applications and microservices while providing enterprise security and manageability across any environment.
For more information, see Flex Gateway Overview.
## Anypoint Mule Gateway
Mule runtime engine includes an embedded Mule Gateway. You can leverage the governance capabilities of API Manager to apply, among other capabilities, throttling, security, caching, and logging to your APIs.
Using Mule Gateway, you can, for example:
  * Apply a basic authentication policy on top of a Mule application.
  * Enrich an incoming or outgoing message.
  * Add any other complex capability to an API without having to write any code.


For more information, see Mule Gateway Overview.
## Flex Gateway vs. Mule Gateway
Flex Gateway can manage and secure APIs, both Mule and non-Mule, running anywhere.
In contrast, Mule Gateway protects a single Mule API. The key advantage is that it’s easy for Mule app developers to provide basic endpoint protection. You can configure Mule in Anypoint Runtime Manager as a CloudHub proxy application, protecting multiple backends.
Building custom policies on Mule Gateway is similar to building an application with Java using the Mule DSL. Building a custom policy in Flex Gateway is based on Envoy-provided Rust WASM SDKs. A Mule Gateway policy cannot be reused in Flex Gateway and vice versa, because the underlying architectures are fundamentally different.
MuleSoft recommends you choose Flex Gateway for high-availability and high-performance Mule and non-Mule applications.
To protect Mule applications that do not require the management and maintenance of underlying infrastructure, choose Mule Gateway for CloudHub.
Flex Gateway | Mule Gateway  
---|---  
Envoy-based API gateway to secure all APIs, Mule and non-Mule, running anywhere |  Java-based API gateway embedded into Mule, to secure only Mule APIs  
  * Underlying engine built upon Envoy
  * Leverages Fluent Bit for logging

|  Java Spring Application embedded into Mule  
  * High performant and high availability
  * Secure any API anywhere.

| 
  * Secure a Mule API basic endpoint, or enable a dedicated proxy as an embedded library in a Mule instance.
  * Also available as a Mule proxy application in CloudHub

  
**Key Capabilities** | 
  * Small footprint
  * Multiple deployment patterns and modes, including as a native Kubernetes Ingress controller
  * Connected Mode as well as Local Mode available

| 
  * Same technology as Mule integration applications
  * API Autodiscovery for Mule applications
  * Connected Mode only

  
**Custom Policy Development** |  Rust WASM SDKs |  Java and Mule DSL