Function Mesh Architecture

3 min readDec 19, 2018


Function Mesh Overview

A new way to develop distributed systems that has never seen before.

A Function Mesh is a new way to inter-connect serverless functions transparently. With this new approach you can build complex distributed systems with multiple dependencies and scale only the hot parts of the system.

With MetaCall is possible to develop monolithic applications and test them locally in your laptop. The code can be later deployed to our FaaS and it will be automatically distributed in different instances. The connections between the nodes are implicit in the code and developers do not have to care about them.

You only have to focus on the business logic and the platform will do everything for you. You will not need to manage anything related to clustering and scaling. With MetaCall you can reduce time to market, auto-scale hot parts of your application and inter-connect easily your functions.

This new model also provides an efficient way to distribute the load between nodes. Nowadays functions are based on containers that run just an script with some invoker, which implies one container for each process. That is a lot of overhead just to run a small snippet of code. In our case each container can run multiple processes at the same time, and also multiple functions at the same time, using at maximum the resources available in the cluster.

A code that was designed to be monolithic will be split in a big mesh of functions that can dynamically scale up or down individual instances, or slice or merge parts depending on the workload.

The only thing you have to care about is to write a small configuration file indicating what code you want to publish and the the gateway will be automatically created for you.

Let’s take a look at the following snippets:

In this example, will be deployed as a high scalable and serverless function and frontend.js will be deployed in a complete different container, with the same characteristics. The configuration metacall.json indicates what scripts are going to be offered to the public, and the API is automatically built upon that script based on the function names.

If we connect our example repository to MetaCall it will generate the following application:

MetaCall Function Mesh Example Overview

With this architecture you can eliminate vendor locking, because you can develop normal code and execute it locally. You remove all DevOps and cluster set up and all headaches related to it. As a developer, you can write complex distributed architectures easily and also reduce time to market.

Current architectures as service mesh are based on multiple containers attached to a micro-service, which makes the cluster expensive. Function Mesh communicates in a efficient way between functions and also distributes the workload between processes. So it also reduces considerably the costs of running a cluster.

If you want to reduce complexity, speed up your development and improve team performance and code quality MetaCall FaaS architecture is your best option.

MetaCall is open-sourced under Apache 2.0 license. Feel free to fork the official repository. Suggestions and contributions are welcome.

See you meta-programmer!

Vicente Eduardo Ferrer García.
Founder & CTO of MetaCall.




From DevOps to NoOps automatically, switch now to Serverless. Drag and Drop your code to generate APIs and deploy Cloud Web Services.