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

Adding performing ratelimit with managed redis performance test steps #2661

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions test/performance/Ratelimit-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Performance Testing Guide for APK with Rate Limiting

Refer to the README.md file in the test/performance directory for general information on performance testing and environment setup.

This guide outlines the steps to configure the environment and conduct performance tests for the APK product with rate limiting enabled.

## Install APK and Setup APIs

### Sample values.yaml for Rate Limiting
When installing APK, refer to the sample helm/values-cpu2-ratelimit.yaml file.

Ensure the following configurations are updated in the values.yaml file:
- Redis URL and Keys: Set the appropriate Redis URL and authentication keys.

### Sample Secret for Redis Authentication

Apply the helm/secrets.yaml file to the cluster after updating it with the necessary Redis credentials.

### Configure Rate Limiter Service (Headless)

In the helm-charts/templates/data-plane/gateway-components/ratelimiter/ratelimiter-service.yaml file, set the clusterIP to None to make the service headless:

```yaml
spec:
clusterIP: None
```

### Configure Rate Limiter Deployment

In the helm-charts/templates/data-plane/gateway-components/ratelimiter/ratelimiter-deployment.yaml file, set the following environment variables:

```yaml
- name: LOG_LEVEL
value: "WARN"
- name: REDIS_TLS_SKIP_HOSTNAME_VERIFICATION
value: "true"
```

### Setup APIs

Apply the API resources from the ratelimitAPIArtifacts/ directory to the cluster.

## Set Up Azure Redis Cache

Create an Azure Redis Cache (Standard C3) instance in the same region as the Kubernetes cluster.
8 changes: 8 additions & 0 deletions test/performance/helm/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: apk-redis-secret
namespace: apk-integration-test
type: Opaque
data:
redisKey: <base64encodedredisKey>
Loading
Loading