Performance Management with Meshery

This guide walks through running performance benchmarks using Meshery. Users can either use the Meshery UI, the CLI, mesheryctl or run performance tests in their CI/CD pipelines using the Meshery GitHub Action.

Installing Meshery

Install and login to Meshery to start running performance benchmarks. See Installation documentation for detailed steps on how to install Meshery.

Meshery dashboard

Meshery Dashboard

If you are looking to run performance benchmarks on a service mesh, you can use Meshery’s service mesh lifecycle management capabilities to deploy a service mesh and deploy your application on the mesh.

With Meshery’s performance benchmarking feature, you can also deploy you application off the mesh and compare the performance and determine the overhead when the app runs on the mesh.

To install a service mesh, see this guide.

Meshery also comes with a set of sample applications that you can quickly deploy to test out the capabilities of your service mesh.

Next, we navigate to the main Performance Testing dashboard. See Performance Management to learn more about performance profiles, load generators, Kubernetes cluster, and service mesh metrics.

Running Performance Benchmarks Through Meshery UI

Meshery UI provides an easy-to-use interface in which users can create performance profiles to run repeated tests with similar configuration and can also even schedule performance tests to be run at particular times through the calendar.

On the navigation menu, click on performance.

This will open the performance management dashboard as shown below.

Performance Management Dashboard

Performance Management Dashboard

To create a performance profile, click on “Manage Profiles” and then select “+ Add Performance Profile”.

Performance Profiles

Performance Profiles

This will open up a popup window where you can fill out the test configuration for running your benchmarks.

Performance Test Configuration

Configuring a Performance Test

You can now save the profile and run the test. The test will continue to run in the background even if you close the popup.

Running a performance test

Once the test is done, you would be able to see the results of the test below.

Running a performance test

Performance Test Results

You can then go back to your performance profile and get these results anytime.

You can also compare different test results in Meshery and draw insights. For example, you can run this test with your application running on different service meshes and check which performs better.

Comparing Test Results

Selecting multiple test results

Comparing Test Results

Comparing multiple test results

Running Performance Benchmarks Through mesheryctl

The mesheryctl perf subcommand provides the performance management features of Meshery in the CLI.

To run a performance test based on a performance profile, run:

mesheryctl perf apply Istio Performance Test

You can also use flags to configure your performance test. For example:

mesheryctl perf apply istio-soak-test --concurrent-requests 1 --duration 15s --load-generator nighthawk --mesh istio --url http://localhost:2323

mesheryctl also supports test configurations written in SMP compatible format as shown below:

test:
  smp_version: v0.0.1
  name: Istio Performance Test
  labels: {}
  clients:
    - internal: false
      load_generator: fortio
      protocol: 1
      connections: 2
      rps: 10
      headers: {}
      cookies: {}
      body: ''
      content_type: ''
      endpoint_urls:
        - 'http://localhost:2323/productpage'
  duration: '30m'
mesh:
  type: 3

And then you can pass this file to mesheryctl as:

mesheryctl perf apply -f perf-config.yaml

You can also override the configuration passed in the file with flags like shown below:

mesheryctl perf apply -f perf-config.yaml --url http://localhost:2323/productpage?u=test --load-generator nighthawk --qps 5

Running Performance Benchmarks in your Pipelines

Meshery also has a meshery-smp-action which is a GitHub action that can be used to run performance tests in your CI/CD pipelines.

Download the token from the Meshery Dashboard by clicking on the profile icon on the top-right corner.

Downloading the token

SMI Conformance Test Results

You can use this token to authenticate the instance of Meshery running in your CI/CD workflow.

The action can be used by defining your test configuration in a performance profile in Meshery or by writing your test configuration in SMP compatible format.

The action can then be configured as shown below:

name: Meshery SMP Action
on:
  push:
    branches:
      'master'

jobs:
  performance-test:
    name: Performance Test
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
        with:
          ref: 'perf'

      - name: Deploy k8s-minikube
        uses: manusa/actions-setup-minikube@v2.4.1
        with:
          minikube version: 'v1.21.0'
          kubernetes version: 'v1.20.7'
          driver: docker

      - name: Run Performance Test
        uses: layer5io/meshery-smp-action@master
        with:
          provider_token: $
          platform: docker
          profile_name: soak-test

More configuration details of the action can be found here.

See sample configurations for more workflow examples using this action.