Architecture

Components, their Purpose, and Languages

Meshery and its components are written using the following languages and technologies.

Components Languages and Technologies
Meshery Server Golang, gRPC, GraphQL, SMP
Meshery Adapters Golang, gRPC, CloudEvents, SMI, OAM
Meshery WASM Filters Rust and C++
Meshery UI ReactJS, NextJS, BillboardJS
Meshery Provider UI ReactJS, NextJS
Meshery Remote Providers any - must adhere to Meshery Extension Points
Meshery Operator Golang
     MeshSync Golang
     Broker Golang, NATS
Meshery Database Golang, SQLlite
Meshery CLI Golang

Deployments

Meshery deploys as a set of containers. Meshery’s containers can be deployed to either Docker or Kubernetes. Meshery components connect to one another via gRPC requests. Meshery Server stores the location of the other components and connects with those components as needed. Typically, a connection from Meshery Server to Meshery Adapters is initiated from a client request (usually either mesheryctl or Meshery UI) to gather information from the Adapter or invoke an Adapter’s operation.

Adapters

In Meshery v0.6.0, Adapters will register with Meshery Server over HTTP POST. If Meshery Server is not available, Meshery Adapters will backoff and retry to connect to Meshery Server perpetually.

Figure: Meshery deploys inside or outside of a Kubernetes cluster

Adapters and Capabilities Registry

Each Meshery Adapter delivers its own unique specific functionality. As such, at time of deployment, the Meshery Adapter will register its cloud native infrastructure-specific capabilities (its operations) with Meshery Server’s capability registry.

Figure: Meshery Adapter Operation Registration

Clients

Meshery’s REST API may be consumed by any number of clients. Clients need to present valid JWT token.

Figure: Clients use Meshery’s REST API, GraphQL API, or a combination of both.

Providers

As a point of extensibility, Meshery supports two types of providers: Local and Remote.

Figure: Meshery Provider architecture

Object Model

This diagram outlines logical constructs within Meshery and their relationships.

Figure: Meshery Object Model

Meshery Operator and MeshSync

Meshery Operator is the multi-cluster Kubernetes operator that manages MeshSync and Meshery Broker.

Figure: Meshery Operator and MeshSync

See the Operator section for more information on the function of an operator and MeshSync section for more information on the function of meshsync.

Database

Meshery Server’s database is responsible for collecting and centralizing the state of all elements under management, including infrastructure, application, and Meshery’s own components. Meshery’s database, while persisted to file, is treated as a cache.

Figure: Meshery Docker Extension

See the Database section for more information on the function of the database.

Meshery Docker Extension

Meshery’s Docker extension provides a simple and flexible way to design and operate cloud native infrastructure on top of Kubernetes using Docker containers. The architecture of this extension is designed to be modular and extensible, with each component serving a specific purpose within the overall deployment process.

Figure: Meshery Docker Extension

Meshery CLI

The Command Line Interface ( also known as mesheryctl ) that is used to manage Meshery. Use mesheryctl to both manage the lifecycle of Meshery itself and to access and invoke any of Meshery’s application and cloud native management functions.

Statefulness in Meshery components

Some components within Meshery’s architecture are concerned with persisting data while others are only concerned with a long-lived configuration, while others have no state at all.

Components Persistence Description
mesheryctl stateless command line interface that has a configuration file
Meshery Adapters stateless interface with cloud native infrastructure on a transactional basis
Meshery Server caches state application cache is stored in $HOME/.meshery/ folder
Meshery Providers stateful location of persistent user preferences, environment, tests and so on
Meshery Operator stateless operator of Meshery custom controllers, notably MeshSync
MeshSync stateless Kubernetes custom controller, continuously running discovery

Network Ports

Meshery uses the following list of network ports to interface with its various components:

Component Port Purpose
Meshery Server 9081/tcp UI, REST and GraphQL APIs
Meshery Server 80/tcp Websocket
Meshery Broker 4222/tcp Client communication with Meshery Server
Meshery Broker 8222/tcp HTTP management port for monitoring Meshery Broker. Available as of Meshery v0.5.0
Meshery Broker 6222/tcp Routing port for Broker clustering. Unused as of Meshery v0.6.0-rc-2
Meshery Broker 7422/tcp Incoming/outgoing leaf node connections. Unused as of Meshery v0.6.0-rc-2
Meshery Broker 7522/tcp Gateway to gateway communication. Unused as of Meshery v0.6.0-rc-2
Meshery Broker 7777/tcp used for Prometheus NATS Exporter. Unused as of Meshery v0.6.0-rc-2
Learn Layer5 Application 10011/tcp SMI conformance testing
Meshery Remote Providers 443/tcp e.g. Meshery Cloud
Meshery Adapter for App Mesh 10005/gRPC Communication with Meshery Server
Meshery Adapter for Cilium Service Mesh 10012/gRPC Communication with Meshery Server
Meshery Adapter for Consul 10002/gRPC Communication with Meshery Server
Meshery Adapter for Istio 10000/gRPC Communication with Meshery Server
Meshery Adapter for Kuma 10007/gRPC Communication with Meshery Server
Meshery Adapter for Linkerd 10001/gRPC Communication with Meshery Server
Meshery Adapter for NGINX Service Mesh 10010/gRPC Communication with Meshery Server
Meshery Adapter for Nighthawk 10013/gRPC Communication with Meshery Server
Meshery Adapter for Network Service Mesh 10004/gRPC Communication with Meshery Server
Meshery Adapter for Open Service Mesh 10009/gRPC Communication with Meshery Server
Meshery Adapter for Tanzu Service Mesh 10011/gRPC Communication with Meshery Server
Meshery Adapter for Traefik Mesh 10006/gRPC Communication with Meshery Server
Meshery Perf 10013/gRPC Performance Management

See the Adapters section for more information on the function of an adapter.

Meshery Connections and their Actions

Connection Type     Action / Behaviour                
  Connect mesheryctl Connect Meshery UI Disconnect Ad hoc Connectivity Test Ongoing Connectivity Test Synthetic Check Deploy mesheryctl Undeploy mesheryctl Deploy Meshery UI Undeploy Meshery UI  
Kubernetes clusters `system start` Upload kubeconfig Click "X" on chip On click of connection chip Yes, via MeshSync No No No No No  
Grafana Servers No Enter IP/hostname into Meshery UI Click "X" on chip On click of connection chip No No No No No No  
Prometheus Servers No Enter IP/hostname into Meshery UI Click "X" on chip On click of connection chip Yes, when metrics are configured in a dashboard Yes No No No No  
Meshery Adapters `system check` Server to Adapter on every UI refresh Click "X on" chip Server to Adapter every click on adapter chip in UI Server to Adapter every 10 seconds - Yes, as listed in meshconfig contexts Yes, as listed in meshconfig contexts Toggle switch needed Toggle switch needed  
Meshery Operator `system check` Upon upload of kubeconfig No On click of connection chip in UI to Server to Kubernetes to Meshery Operator No - `system start` `system stop` Upon upload of kubeconfig & Toggle of switch Toggle of switch  
MeshSync `system check` follows the lifecycle of Meshery Operator No On click of connection chip in UI to Server to Kubernetes to Meshery Operator to MeshSync Managed by Meshery Operator On click of connection chip follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator  
Broker `system check` follows the lifecycle of Meshery Operator No On click of connection chip in UI to Server to Brokers exposed service port NATS Topic Subscription On click of connection chip follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator follows the lifecycle of Meshery Operator  


Please also see the Troubleshooting Toolkit and the Meshery v0.7.0: Connection States (Kubnernetes) Design Review