Requirements and Limits for Flex Gateway | MuleSoft Documentation
# Requirements and Limits for Flex Gateway
Before you download and install Anypoint Flex Gateway, review the following requirements and limits.
## Flex Gateway Requirements
### Permission Requirements
To use Flex Gateway you must have these permissions:
Permission | Ability | Notes  
---|---|---  
Manage Servers |  Create, update, and delete server and Flex Gateway resources. |  Runtime Manager permission, which is assigned to a specific environment in a Business Group.  
Read Servers |  View server and Flex Gateway resources. |  Runtime Manager permission, which is assigned to a specific environment in a Business Group.  
Usage Viewer |  View gateway metrics. |  Usage permission, which can be added only by an organization administrator at the root organization level.  
Your Anypoint Platform Admin can add these permissions in Access Management. See Manage Team Permissions for more information.
### Connected App Scope Requirements
To register Self-Managed Flex Gateway using a Connected App, the following scopes are required:
  * Manage Servers
  * Read Servers
  * View Organization


## Managed Flex Gateway Resource Requirements
To use Managed Flex Gateway your Business Group must have at least one of these Managed Flex Gateway resources:
  * Large Managed Flex Gateways
  * Small Managed Flex Gateways


These resources aren’t inherited. To redistribute Managed Flex Gateway resources to a business group, see Redistribute Resources Between Existing Business Groups.
## Managed Flex Gateway Private Space Requirement
To use Managed Flex Gateway, you have created a private space in CloudHub 2.0 or have access to a private space created by someone else.
To create a private space, see Creating Private Spaces.
## Software Requirements for Self-Managed Flex Gateway
Flex Gateway isn’t supported on Windows or in Docker running on Windows.
### Software Requirements for Kubernetes and OpenShift Deployments
Running Flex Gateway requires:
  * A minimum of either Kubernetes 1.21 or OpenShift 4.8.
  * Ingress v1 (stable), which requires specifying `apiVersion: networking.k8s.io/v1` as the API version in your configuration resources.
  * A private cloud or data center.
Or, a cloud provider such as the following:
    * Google Kubernetes Engine (GKE)
    * Amazon Elastic Kubernetes Service (Amazon EKS)
    * Azure Kubernetes Service (AKS)


  * A minimum Helm version of 3.0.0 is required.


### Software Requirements for Linux Deployments
Flex Gateway runs on the following Long Term Support (LTS) versions of Linux:
  * Amazon Linux 2023
  * CentOS 8
  * Debian Bookworm
  * Red Hat Enterprise Linux (9)
  * Red Hat Enterprise Linux (9) on IBM Power (ppc64le)
  * Ubuntu Jammy


Flex Gateway is designed to run in cloud-native architectures. Therefore, multiple installations on a single Linux VM aren’t supported. You can install only one gateway instance per Linux VM.
### Software Requirements for Container Deployments
Flex Gateway supports the following:
  * Docker
  * Podman


Additionally, Flex Gateway supports the following container orchestration services:
  * Amazon Elastic Container Service (Amazon ECS)
  * Azure Container Service (ACS)
  * Google Cloud Run
  * AWS Fargate


## Hardware Requirements for Self-Managed Flex Gateway
A single Flex Gateway can support multiple backend APIs. To support more backend APIs, you can deploy multiple replicas or additional Flex Gateways. For information about sizing, refer to Resource Sizing for Self-Managed Flex Gateway.
Flex Gateway requires either an Intel or AMD-64 processor.
## Ports, IPs, and Hostnames Allowlist Requirements
For Flex Gateway to communicate with MuleSoft-managed online Anypoint Platform APIs and services, you must add these hostnames and ports of external resources to the allowlist:
Plane | Host | Port | Mode | Description | Protocol  
---|---|---|---|---|---  
**anypoint.mulesoft.com** | Required to connect with the control plane, push internal metrics, and download custom policy binaries.  
**arm-mcm2-service.kprod.msap.io** | Required to communicate with the transport layer.  
**logging.ingestion.us-east-1.prod.cloudhub.io** | Required to send analytics data to the control plane.  
**metering.ingestion.us-east-1.prod.cloudhub.io** | Required to send analytics data to the control plane.  
**monitoring.ingestion.us-east-1.prod.cloudhub.io** | Required to send analytics data to the control plane.  
**exchange-files.anypoint.mulesoft.com** | Connected | Required to download policies.  
**exchange2-asset-manager-kprod.s3.amazonaws.com** | Connected | Required to download policies.  
**configuration-resolver.prod.cloudhub.io** | Connected | Required to download policies.  
**us1.ingest.mulesoft.com** | Required to send analytics data to the control plane.  
**flex-packages.anypoint.mulesoft.com** | Required to download and install Flex Gateway.  
**eu1.anypoint.mulesoft.com** | Required to connect with the control plane, push internal metrics, and download custom policy binaries.  
**arm-mcm2-service.kprod-eu.msap.io** | Required to communicate with the transport layer.  
**logging.ingestion.eu-central-1.prod-eu.msap.io** | Required to send analytics data to the control plane.  
**metering.ingestion.eu-central-1.prod-eu.msap.io** | Required to send analytics data to the control plane.  
**eu1.ingest.mulesoft.com** | Required to send analytics data to the control plane.  
**monitoring.ingestion.eu-central-1.prod-eu.msap.io** | Required to send analytics data to the control plane.  
**configuration-resolver.prod-eu.msap.io** | Connected | Required to download policies.  
**exchange-files.eu1.anypoint.mulesoft.com** | Connected | Required to download policies.  
**exchange2-asset-manager-kprod-eu.s3.eu-central-1.amazonaws.com** | Connected | Required to download policies.  
**flex-packages.anypoint.mulesoft.com** | Required to download and install Flex Gateway.  
**flex-packages.eu1.anypoint.mulesoft.com** | Required to download and install Flex Gateway.  
Port 9998 is reserved for internal processes, and should not be used in `ApiInstance` definitions.  
---  
## Flex Gateway Limits
Limit | Value | Notes  
---|---|---  
Request header |  Requests that exceed this limit receive a `431` response.  
This limit applies only to buffering the payload (such as logging the payload using message logging). If you’re not accessing the payload, the payload size has no limit. Payloads that exceed this limit receive a 413 response.  
Contracts per API |  Exceeding this limit isn’t supported but doesn’t cause errors.  
Contracts per gateway instance |  Exceeding this limit isn’t supported but doesn’t cause errors.  
Upstreams per API |  The 100 upstreams can consist of a combination of different routes. To learn more, see Multiple Upstream Limits.  
Routes per API  
Upstreams per route  
### Managed Flex Gateway Limits
Limit | Value | Notes  
---|---|---  
APIs per Large Managed Gateway instance |  Exceeding this limit isn’t supported but doesn’t cause errors.  
APIs per Small Managed Gateway instance |  Exceeding this limit isn’t supported but doesn’t cause errors.  
Requests per second for Large Managed Gateway  
Requests per second for Small Managed Gateway  
### Self-Managed Flex Gateway Limits
Limit | Value | Notes  
---|---|---  
Request header |  Requests that exceed this limit receive a `431` response.  
APIs per Self-Managed Gateway instance |  Exceeding this limit isn’t supported but doesn’t cause errors.  
## Flex Gateway Environment Variables
Environment Variable | Default Value | Function  
---|---|---  
FLEX_CONNECTION_IDLE_TIMEOUT_SECONDS |  Maximum number of seconds a connection can be idle before it times out.  
FLEX_DOWNSTREAM_CONNECTION_BUFFER_LIMIT_BYTES |  1048576 (1 MB) |  Maximum size, in bytes, of read and write buffers for new connections.  
FLEX_ENVOY_HEADERS_ENABLED |  Allows (`true`) or removes (`false`) Envoy headers from requests.  
FLEX_STREAM_IDLE_TIMEOUT_SECONDS |  Maximum number of seconds a stream can remain idle without receiving any data in either the inbound (client to Flex Gateway) or outbound (Flex Gateway to upstream service) direction.  
FLEX_UPSTREAM_CONNECTION_IDLE_TIMEOUT_SECONDS |  Maximum number of seconds a stream between Flex Gateway and the upstream service can remain idle between requests.  
FLEX_UPSTREAM_RESPONSE_TIMEOUT_SECONDS |  Maximum number of seconds a Flex Gateway waits for a response from an upstream service.  
### See also
  * Configuring Timeouts in Connected Mode
  * Configuring Timeouts in Local Mode