MuleSoft Universal API Management. A first glimpse of the new Flex Gateway.

Rolando Carrasco
5 min readMay 6, 2022

--

MuleSoft has been in the API Management market for several years. Is one of the pioneers that started the API Management story several years ago.

In my case, I’ve been working with MuleSoft since 2014, even before the Salesforce acquisition and it is clear how natural MuleSoft manages the API concepts. And it is also true that MuleSoft is constantly innovating and getting the attention of different communities: low code and core programmers.

One of MuleSoft’s latest announcements is the Flex Gateway which, in my opinion, comes to seal the leadership that MuleSoft has in the market and separate them from the rest of the competition. And with it, MuleSoft can easily say that it offers a unique Universal API Management.

Why a Universal API Management? What is that? Why Universal?

Let me share with you this image:

As you can see is the API Manager module within the Anypoint Platform. But what I want to highlight is the column Runtime. You can identify a lot of options for where MuleSoft API Manager is managing its APIs:

  1. Flex Gateway: The latest addition to MuleSoft’s portfolio. This Gateway can be deployed pretty much everywhere: directly on a bare metal server running Linux, inside a Docker container, or on top of Kubernetes. This Flex Gateway is designed to sit in front of microservices, SOA Services, and other APIs. The Flex in its name is because of its ability to be deployed in different environments and to be used in heterogeneous ecosystems. Flex Gateway capabilities are focused on: routing, access control (basic authentication, OAuth), and policy enforcement. Because of its nature, it can be deployed very close to where the backend services and/or microservices live.
  2. Sevice Mesh: This is another very good capability offered by MuleSoft. This can be used on top of Kubernetes and Openshift. Designed to deploy the service mesh on top of your current services and microservices. For a customer who wants to manage their APIs implemented via microservices and wants to have an ingress controller where policies can be applied, this is the option.
  3. Mule Runtime: This is the normal MuleSoft Runtime that can be deployed on hybrid mode. If you are implementing MuleSoft applications and it happens that some of them are exposed as APIs, you can also manage those APIs using the same API Manager as in the previous options. This model is the one where not only MuleSoft is acting as the API Manager and Gateway, but also as the medium where the API implementations live.
  4. Runtime Fabric: This is not depicted in the previous image, but you can also have the same API Manager as in the previous three options, managing your APIs running on top of MuleSoft Runtime Fabric, which is an appliance that you can deploy on several cloud providers (AWS, GCP, Azure), and that offers elasticity, isolation, scalability for your MuleSoft applications and APIs.

As you can see, MuleSoft API Manager can manage APIs that live pretty much everywhere. They can be on-premise, in the cloud; they can be MuleSoft applications, they can be microservices developed on any programming language; they can live in Kubernetes, in Openshift; they can live in containers, bare-metal servers; they can be public APIs, etc. And guess what? MuleSoft can manage them. That is why MuleSoft is the only option in the market with such a broad extension to manage APIs.

Once managed by MuleSoft API Manager you can apply the same set of policies. You can monitor them in the same way. You can manage their contracts. Create plans around them. Commonly manage their lifecycle.

If you are curious about how easy is to deploy a Flex Gateway, let’s do it in less than five minutes. Follow the next steps:

  1. Decide where you want to deploy your gateway: Linux Server, Docker, or Kubernetes. In my case, I will use Docker.
  2. Decide a name. I will use: myNewGtwy
  3. Go to https://anypoint.mulesoft.com and sign-up for a free trial account
  4. Go to Runtime Manager

You can see the new Flex Gateways option. Click on it.

5. Add a Gateway.

6. Decide the best option for your use case. In my case Docker

7. The instructions for installing the gateway inside Docker will appear:

8. Execute them as follow:

docker pull mulesoft/flex-gateway:1.0.0

docker run — entrypoint flexctl -w /registration \ -v “$(pwd)”:/registration mulesoft/flex-gateway:1.0.0 \ register myNewGtwy \ — token=2f2e8566-c841–4317–83a337af4 \ — organization=ef6ea-8cab-80dcf5230051 \ — connected=true

After executing the previous command, three files will be created in the directory where you are executing the commands:

root@rcarrascogb:~/mulesoft/flexgtwy/myNewGtwy# ls -la
total 24
drwxr-xr-x 2 root root 4096 May 6 01:17 .
drwxr-xr-x 5 root root 4096 May 6 01:10 ..
-rw — — — — 1 root root 723 May 6 01:17 7b677bbb4–6488406a2ced.conf
-rw — — — — 1 root root 1675 May 6 01:17 7b677bbbb4–6488406a2ced.key
-rw — — — — 1 root root 6337 May 6 01:17 7b677bbbb4–6488406a2ced.pem

Take a note of the ID (the name of the files) because we will need it in the next step:

docker run — rm \
-v /root/mulesoft/flexgtwy/myNewGtwy:/etc/flex-gateway/rtm \
-p 8081:8081 \
-e FLEX_RTM_ARM_AGENT_CONFIG=/etc/flex-gateway/rtm/7b677bbbb4–6488406a2ced.conf \
mulesoft/flex-gateway:1.0.0

Once that command is execute, you are done. Did you clock it?

Now get back to the Anypoint Platform console and click on the Flex Gateways link:

You will see your newly created Flex Gateway.

That was fast, right?

Now is time to manage an API that is accessible via the Flex Gateway. But that will happen on a next article.

This was a very fast post about how MuleSoft is constantly growing and how can be a unique Universal API Management platform. Flex Gateway is just a piece of it, but in my opinion, it was the missing piece on MuleSoft’s puzzle. Now is there, is GA. Go get and try it. You will have some fun in the process.

--

--