Open
Description
In the GlooEdge Workshop... The read along for the rate limiting section reference 'per second' and the YAML references 'per minute'. Please adjust based on the desired outcome.
// Snippet
Users of organizations with the enterprise subscription have a rate limit of 8 requests per second
Users of organizations with the free subscription have a rate limit of 2 requests per second
We define those rate limits using the following RateLimitConfig definition:
// YAML
kubectl apply -f - << EOF
apiVersion: ratelimit.solo.io/v1alpha1
kind: RateLimitConfig
metadata:
name: limit-users
namespace: gloo-system
spec:
raw:
setDescriptors:
- simpleDescriptors:
- key: email-key
- key: organization-key
- key: subscription-key
value: free
rateLimit:
requestsPerUnit: 2
unit: MINUTE
- simpleDescriptors:
- key: email-key
- key: organization-key
- key: subscription-key
value: enterprise
rateLimit:
requestsPerUnit: 8
unit: MINUTE
rateLimits:
- setActions:
- requestHeaders:
headerName: x-email
descriptorKey: email-key
- requestHeaders:
headerName: x-organization
descriptorKey: organization-key
- requestHeaders:
headerName: x-subscription
descriptorKey: subscription-key
EOF
Metadata
Assignees
Labels
No labels