In June 2022, MuleSoft launched Anypoint Flex Gateway, an ultrafast API Gateway to protect and manage any API. Flex Gateway is an envoy-based gateway and supports multiple deployment options like Kubernetes-based target environments, IBM Power, Heroku, and on-premise.
This self-managed and distributed API Gateway coupled with MuleSoft’s centralized control plane, Anypoint API Manager, provides a powerful and flexible solution to protect and manage any API. But planning for infrastructure, maintaining, scaling and troubleshooting API Gateway can be challenging.
MuleSoft is now extending the proven Flex Gateway capabilities to a fully-managed Flex Gateway on CloudHub 2.0 allowing development teams to automate deployment, management, and monitoring of their API Gateways while ensuring enterprise-grade security throughout the API lifecycle.
7 steps to get started with Anypoint Managed Flex Gateway
In this guide, we’ll walk through the process of creating and deploying a Managed Flex Gateway, from setting up the required gateway with just simple steps to deploying and securing your first API. Before we begin, make sure you have an Anypoint Platform account and an understanding of API management concepts.
Here are the seven steps we’ll walk through:
- Create a Private Space in CloudHub 2.0
- Set up a Managed Flex Gateway
- Configure Advanced Options
- Explore the Gateway dashboard
- Deploy an API to your Flex Gateway
- Configure API settings
- Secure Your API with Policies
1. Create a Private Space in CloudHub 2.0
The first step in configuring a Managed Flex Gateway is to create or access a private space in CloudHub 2.0.
- Navigate to Runtime Manager > Private Spaces
- On this page, you’ll see a list of private spaces associated with your selected business group
- Click Create Private Space
- Enter a name for your private space and click Create
- After creating a private space, you’ll be prompted to set up a private network
- You can either create a Private Network with custom configurations or use the defaults
2. Set up a Managed Flex Gateway
Now that you have a private space with network configurations, you’re ready to set up your Managed Flex Gateway.
- Ensure you’re in the environment where you want to deploy the Managed Gateway
- In Runtime Manager, click Flex Gateways from the side navigation panel
- Navigate to the Managed Flex Gateway tab
- Click Add Managed Flex Gateway
- Enter a Gateway Name (e.g. “happy-bird”)
- Select the private space you created as your Deployment Target
- Choose a release channel:
- Edge: Support available for five months and extended support for three months
- Long-term: Support available 18 months and an extension of six months
- Select a version
- Select the gateway size based on your needs:
- Small: Better for testing and staging; can handle 50 APIs with up to 100 requests per second
- Large: Better for production; can handle 500 APIs with up to 500 requests per second
3. Configure Advanced Options
Click on Advanced Options to configure additional settings:
- Public Endpoint and Host Details: Access details for your Flex Gateway
- Properties: Configure timeout properties for your Managed Gateway
- Logging: Options to forward application logs to your monitoring infrastructure (if unchecked, logs will be stored in Runtime Manager)
- Once satisfied with your configuration, click “Save & Deploy”. Within a few minutes, your Flex Gateway will be up and running.
4. Explore the Gateway dashboard
Every deployed Managed Flex Gateway comes with its own dashboard providing information on:
- Public and internal endpoints
- Usage details: Number of APIs deployed, API requests processed in the current month, and monthly data consumption in gigabytes
- Additional metrics: CPU and memory usage, latency, error count, and API requests
Here is an example of an existing gateway with 18 APIs deployed:
5. Deploy an API to your Flex Gateway
Now that your Flex Gateway is set up, let’s deploy an API.
- Click Add an API Instance from the gateway Dashboard
- Select Flex Gateway as the runtime
- Choose the Flex Gateway you created (e.g. “flex-demo”)
- Click Next
- Select an API source. You can do the following:
- Choose an API from Exchange (recommended)
- Create an API from an existing OAS or RAML specification
- Import an API configuration file
- Create a new API
- If creating a new API, provide a name and select HTTP asset as the type
- After selecting or creating your API, review the details and click Next
6. Configure API settings
Configure downstream settings for inbound traffic:
- Base path (useful for multiple APIs on the same gateway)
- Client Provider (e.g. Anypoint)
- Instance label (for multiple instances of the same API)
Configure upstream settings to define how traffic flows to your services:
- For Managed Flex Gateway, you can route API traffic based on URL/path, TLS context, weight, or headers
- Review your configuration and click Deploy
7. Secure Your API with Policies
Now that your API is deployed on the Managed Flex Gateway, you can secure it with policies.
- Navigate to the API Summary page to view key metrics such as Total Requests and Policy Violations
- Go to the Policies tab to see automatically enforced organization-level policies
To add a new policy (e.g. rate limiting):
- Choose the desired policy
- Configure the policy settings (e.g. number of requests, time period)
- Click Apply
- Test your API using the public endpoint from the happy-bird dashboard
Enhanced security and scalability with Managed Flex Gateway
Managed Flex Gateway eliminates the overhead of managing container dependencies and frees your team from provisioning Kubernetes clusters, configuring infrastructure, and handling gateway software deployment. MuleSoft takes on the operational burden of API management and governance, allowing your developers and architects to focus on business-critical tasks.
With just a few steps, you can set up a fully managed, secure, and scalable gateway for your APIs. The platform provides robust monitoring, security policies, and governance tools to ensure your APIs meet the highest standards of performance and security.
Ready to simplify your API management journey? Sign up for a free trial of Anypoint Platform to see the products in action today!