Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auto-scaling #182

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

gregoriomartin
Copy link

Description

This PR contains the code and configuration used in an auto-scaling environment. It has the objective of scale the cluster based on the amount of HTTP requests received by any API developed with FastAPI, in this scenario, the Stac API.

  • Auto-scaling environment deployment.
  • Enabled HTTP Total Requests from Stac API using Prometheus.
  • Prometheus Adapter enabled.
  • HPA enabled reading http_total_request metric from Stac API.
  • Overprovisioning strategy.

The idea from this PR is to test and ensure

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The environment was deployed and tested using Azure Load Testing.

Load Test
bench_v4_hpa_overprov-test

In green http requests received by the Stac API. Blue lines means the start and end of the load test.
bench_v4_hpa_overprov-http

Replicas and Nodes during test.
bench_v4_hpa_overprov-pods

How to test:

  1. Deploy the environment.
  2. Run any of the Benchmarks on the Azure Load Testing instance.
  3. Navigate to the Cluster instance on Azure Portal and check that there should be several pods of the Stac API running.

Another option is to activate Managed Grafana and visualize metrics there.

Checklist:

Please delete options that are not relevant.

  • I have performed a self-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants