Back to Meshery

Architecture

docs/content/en/concepts/architecture/_index.md

1.0.4611.4 KB
Original Source

Components, their Purpose, and Languages

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

ComponentsLanguages and Technologies
Meshery ServerGolang, gRPC, GraphQL, SMP
[Meshery Database]({{< ref "concepts/architecture/database/index.md" >}})Golang, SQLlite
Meshery UIReactJS, NextJS, BillboardJS
Meshery Provider UIReactJS, NextJS
[Meshery Operator]({{< ref "concepts/architecture/operator/index.md" >}})Golang
[MeshSync]({{< ref "concepts/architecture/meshsync.md" >}})Golang
[Broker]({{< ref "concepts/architecture/broker/index.md" >}})Golang, NATS
Meshery CLIGolang
--- [Extensions]({{< ref "extensions/_index.md" >}}) ---
[Meshery Adapters]({{< ref "concepts/architecture/adapters.md" >}})Golang, gRPC, CloudEvents
[Meshery Remote Providers]({{< ref "reference/extensibility/providers/index.md" >}})any - must adhere to Meshery [Extension Points]({{< ref "reference/extensibility/_index.md" >}})
Envoy WASM FiltersRust and C++

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.

<a href="{{< static "images/meshery-architecture.webp" >}}" class="lightbox-image"> }}" width="50%" /></a>

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.

<a href="images/meshery-adapter-operation-registration.svg" class="lightbox-image"> </a>

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.

<a href="images/Meshery-client-architecture.webp" class="lightbox-image"> </a>

Figure: Clients use Meshery's [REST API]({{< ref "reference/extensibility/api.md#rest" >}}), [GraphQL API]({{< ref "reference/extensibility/api.md#graphql" >}}), or a combination of both.

Providers

As a point of extensibility, Meshery supports two types of [providers]({{< ref "reference/extensibility/providers/index.md" >}}): Local and Remote.

<a href="images/Meshery-provider-architecture.webp" class="lightbox-image"> </a> <figure> <figcaption>Figure: Meshery Provider architecture</figcaption> </figure>

Object Model

This diagram outlines logical constructs within Meshery and their relationships.

<a href="images/meshery_extension_points.svg" class="lightbox-image"> </a> <figure> <figcaption>Figure: Meshery Object Model</figcaption> </figure>

Meshery Operator and MeshSync

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

<a href="images/meshery-operator-and-meshsync.svg" class="lightbox-image"> </a> <figure> <figcaption>Figure: Meshery Operator and MeshSync</figcaption> </figure>

See the [Operator]({{< ref "concepts/architecture/operator/index.md" >}}) section for more information on the function of an operator and [MeshSync]({{< ref "concepts/architecture/meshsync.md" >}}) 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.

<a href="images/meshery-database.webp" class="lightbox-image"> </a> <figure> <figcaption>Figure: Meshery Docker Extension</figcaption> </figure>

See the [Database]({{< ref "concepts/architecture/database/index.md" >}}) 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.

<a href="images/meshery-docker-extension.svg" class="lightbox-image"> </a> <figure> <figcaption>Figure: Meshery Docker Extension</figcaption> </figure>

Meshery CLI

The Command Line Interface ( also known as [mesheryctl]({{< ref "guides/mesheryctl/working-with-mesheryctl.md" >}}) ) 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.

ComponentsPersistenceDescription
[mesheryctl]({{< ref "guides/mesheryctl/working-with-mesheryctl.md" >}})statelesscommand line interface that has a configuration file
[Meshery Adapters]({{< ref "concepts/architecture/adapters.md" >}})statelessinterface with cloud native infrastructure on a transactional basis
Meshery Servercaches stateapplication cache is stored in $HOME/.meshery/ folder
[Meshery Providers]({{< ref "reference/extensibility/providers/index.md" >}})statefullocation of persistent user preferences, environment, tests and so on
[Meshery Operator]({{< ref "concepts/architecture/operator/index.md" >}})statelessoperator of Meshery custom controllers, notably MeshSync
[MeshSync]({{< ref "concepts/architecture/meshsync.md" >}})statelessKubernetes custom controller, continuously running discovery

Network Ports

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

{{< network-ports >}}

See the [Adapters]({{< ref "concepts/architecture/adapters.md" >}}) section for more information on the function of an adapter.

Meshery Connections and their Actions

Connection TypeConnect mesheryctlConnect Meshery UIDisconnectAd hoc Connectivity TestOngoing Connectivity TestSynthetic CheckDeploy mesheryctlUndeploy mesheryctlDeploy Meshery UIUndeploy Meshery UI
Kubernetes clusterssystem startUpload kubeconfigClick "X" on chipOn click of connection chipYes, via MeshSyncNoNoNoNoNo
Grafana ServersNoEnter IP/hostname into Meshery UIClick "X" on chipOn click of connection chipNoNoNoNoNoNo
Prometheus ServersNoEnter IP/hostname into Meshery UIClick "X" on chipOn click of connection chipYes, when metrics are configured in a dashboardYesNoNoNoNo
[Meshery Adapters]({{< ref "concepts/architecture/adapters.md" >}})system checkServer to Adapter on every UI refreshClick "X on" chipServer to Adapter every click on adapter chip in UIServer to Adapter every 10 seconds-Yes, as listed in meshconfig contextsYes, as listed in meshconfig contextsToggle switch neededToggle switch needed
[Meshery Operator]({{< ref "concepts/architecture/operator/index.md" >}})system checkUpon upload of kubeconfigNoOn click of connection chip in UI to Server to Kubernetes to Meshery OperatorNo-system startsystem stopUpon upload of kubeconfig & Toggle of switchToggle of switch
[MeshSync]({{< ref "concepts/architecture/meshsync.md" >}})system checkfollows the lifecycle of Meshery OperatorNoOn click of connection chip in UI to Server to Kubernetes to Meshery Operator to MeshSyncManaged by Meshery OperatorOn click of connection chipfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operator
[Broker]({{< ref "concepts/architecture/broker/index.md" >}})system checkfollows the lifecycle of Meshery OperatorNoOn click of connection chip in UI to Server to Brokers exposed service portNATS Topic SubscriptionOn click of connection chipfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operatorfollows the lifecycle of Meshery Operator

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

Architectural Concepts