This guide describes how to create an Optimization Study and all its supporting artifacts using the Akamas CLI. All the corresponding configuration files and scripts required for being used in the Akamas In-A-Sandbox environment can be downloaded from the Akamas public GitHub repository (see here below).

Notice that the Online Boutique application used as target system for the optimization study described in this guide is also made available the Akamas In-A-Sandbox environment.

Download artifacts

All the configuration files and scripts referenced in this guide can be downloaded from Akamas' public GitHub repository.

Please clone the repository in the same directory where you have downloaded the Akamas CLI by running the command

git clone

What you will learn

What you will need

The Online Boutique application is a cloud-native microservices application implemented by Google as a demo application for Kubernetes. It is a web-based sample, yet fully-fledged, e-commerce application.


To model the Online Boutique inside Akamas, we need to create a corresponding System with its components in Akamas, and also associate a Prometheus telemetry instance to the system to allow Akamas to collect the performance metrics.

The entire Akamas system, together with the Prometheus telemetry instance, can be installed with a single command by leveraging the script provided in the scripts folder.

This script requires, as an argument, the public IP address of the cluster CLUSTER_IP.

Now you need to first login to Akamas with the following command:

akamas login --user <login> --password <password>

and then run the above-mentioned script in a shell where you have the Akamas CLI installed:

bash kubernetes-online-boutique/scripts/ <CLUSTER_IP>

The scripts should return a message similar to: System created correctly.

At this point, you can access the Akamas UI under and verify that the System and its component are listed in the Systems menu:


Notice that this System leverages the following Optimization Packs:

The next step is to create a workflow describing the steps executed in each experiment of your optimization study.

A workflow in an optimization study for Kubernetes is typically composed of the following tasks:

You can create the Akamas workflow with a single command by leveraging the script provided in the scripts folder. Also, this script requires a parameter:

The artifact in your cloned repo contains the workflow.yaml file that creates the workflow by issuing the following command:

bash kubernetes-online-boutique/scripts/ <CLUSTER_IP>

You can verify that this workflow has been created by accessing the corresponding Workflow menu in the Akamas UI:


All scripts and templates used in the steps of this workflow can be found in the kubernetes-online-boutique/workflow-artifacts folder.

For this study, we define a goal of increasing the application throughput, while enforcing the constraint of keeping the latency below 500 ms and error rate below 2%.

You can create the optimization study using the study.yaml file in the akamas/studies folder by issuing the Akamas command:

akamas create study kubernetes-online-boutique/akamas/studies/study.yaml

and then run it by issuing the Akamas command:

akamas start study 'Maximizing Kubernetes Online Boutique cost efficiency while matching SLOs'

You can now explore this study from the Study menu in the Akamas UI and then move to the Analysis tab.


As the optimization study executes the different experiments, this chart will display more points and their associated score.

Let's now take a look at the results and benefits Akamas achieved in this optimization study. Mind that you might achieve different results as the actual best configuration may depend on your actual setup (i.e., operating systems, cloud or virtualization platform, and the hardware).

First of all, the best configuration was quickly identified, providing an application efficiency increase of 17%, without affecting the response time.


Let's look at the best configuration from the Summary tab: this configuration specifies the right amount of CPU and memory for each microservice.


It's interesting to notice that Akamas did adjust the CPU and memory limits of every single microservice:

Let's navigate the Insights section, which provides details of the best experiment for each of the selected KPIs.


The best experiments according to the selected KPIs are automatically tagged and listed in the table. Experiment 34 reached the best efficiency, while experiment 53 achieves the best throughput and a decrease in the response time. Also, notice that a couple of identified configurations improved the application response time even more (up to 87%) while not representing the best configuration.

The experiments can be plotted and the results will be shown such as below.


This optimization study shows how it is possible to tune a Kubernetes application made by several microservices, which represents a complex challenge, typically requiring days or weeks of time and effort even for expert performance engineers, developers, or SRE. With Akamas, the optimization study only took about 4 hours to automatically identify the optimal configuration for each Kubernetes microservice.

You have finished exploring an Akamas study and its supporting artifacts to optimize a Kubernetes application.

You might want to continue using Akamas UI and CLI to create other studies and artifacts for optimizing the environments included in the Akamas-In-A-Sandbox environment.

© Akamas Spa 2018-present. Akamas and the Akamas logo are registered trademarks of Akamas Spa.