# Using

To optimize a new application on Akamas you have to follow four steps shown in the following picture and described in the next sections by means of a simple example.

<figure><img src="https://4130935629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhQQ7Gjkum9VLR9lROXGD%2Fuploads%2Fgit-blob-60c0f143b5c06dea0f19c9b4f00ad64cf70350ea%2Fimage%20(1)%20(1)%20(1).png?alt=media" alt=""><figcaption><p>Steps to setup a new optimization</p></figcaption></figure>

As depicted in the picture above, to optimize a new application you should:

* Create a system that models the key parts of your application (e.g. containers, runtimes, APIs) that will be interested in the optimization initiative.
* Set up the integration with a monitoring tool via telemetry providers so that Akamas can gather metrics about the performance of your application.
* Create a workflow that allows Akamas to configure your application (e.g. write a configuration file, relaunch a process).
* Define the optimization study according to your goal and SLOs so that Akamas knows what you want to achieve.

These steps relate to how Akamas integrates with your environment, [described in this section](https://docs.akamas.io/akamas-docs/3.4.0/broken-reference), and apply to both offline and live optimization studies.

## Example Application

In the following sections, we will use a simple yet representative web application to illustrate how to onboard a new application on Akamas. The application is called Online Boutique. It is a microservices application composed of 11 microservices that allow users to browse items, add them to the cart, and purchase them in an online store.

Suppose that we are about to deploy a major upgrade to one of the microservices, the Ad Service, that handles the advertisement logic, and we want to reduce the costs of running this service while meeting our SLO on the response time given an increasing number of users.

As shown in the diagram below, our service is built in Java, deployed as a pod in a Kubernetes cluster, and exposes an API using a service. The whole platform is monitored with Dynatrace.

<figure><img src="https://4130935629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhQQ7Gjkum9VLR9lROXGD%2Fuploads%2Fgit-blob-51bd89e78ed511f1b4437fd78ad6e35a6e952227%2Fimage%20(1)%20(1)%20(1)%20(1).png?alt=media" alt="" width="273"><figcaption><p>Online Boutique Ad microservice deployment</p></figcaption></figure>

{% hint style="info" %}
If your technology stack or optimization need does not fit this example, take a look at the [Optimization Guide](https://docs.akamas.io/akamas-docs/3.4.0/optimization-guides) section where you can find many optimization scenarios for different use cases.
{% endhint %}

You can now proceed to the first step, creating the system to model this application.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.4.0/using.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
