Skip to content

Commit

Permalink
Merge pull request #2661 from CrowleyRajapakse/testbeta2
Browse files Browse the repository at this point in the history
Adding performing ratelimit with managed redis performance test steps
  • Loading branch information
CrowleyRajapakse authored Dec 6, 2024
2 parents 2a6729a + 0f5dae4 commit fe9718d
Show file tree
Hide file tree
Showing 10 changed files with 755 additions and 0 deletions.
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

0 comments on commit fe9718d

Please sign in to comment.