• Redis Quota
    • Params
    • Params.Override
    • Params.Quota
    • Params.QuotaAlgorithm

    Redis Quota

    The redisquota adapter can be used to support Istio’s quota managementsystem. It depends on a Redis server to store quota values.

    This adapter supports the quota template.

    Params

    redisquota adapter supports the rate limit quota using either fixed orrolling window algorithm. And it is using Redis as a shared data storage.

    Example configuration:

    1. redisServerUrl: localhost:6379
    2. connectionPoolSize: 10
    3. quotas:
    4. - name: requestcount.quota.istio-system
    5. maxAmount: 50
    6. validDuration: 60s
    7. bucketDuration: 1s
    8. rateLimitAlgorithm: ROLLING_WINDOW
    9. overrides:
    10. - dimensions:
    11. destination: ratings
    12. source: reviews
    13. maxAmount: 12
    14. - dimensions:
    15. destination: reviews
    16. maxAmount: 5
    FieldTypeDescriptionRequired
    quotasQuota[]The set of known quotas. At least one quota configuration is requiredNo
    redisServerUrlstringRedis connection string <hostname>:<port number>ex) localhost:6379No
    connectionPoolSizeint64Maximum number of idle connections to redisDefault is 10 connections per every CPU as reported by runtime.NumCPU.No

    Params.Override

    FieldTypeDescriptionRequired
    dimensionsmap<string, string>The specific dimensions for which this override applies.String representation of instance dimensions is used to check against configured dimensions.dimensions should not be emptyNo
    maxAmountint64The upper limit for this quota override.This value should be bigger than 0No

    Params.Quota

    FieldTypeDescriptionRequired
    namestringThe name of the quotaNo
    maxAmountint64The upper limit for this quota. max_amount should be bigger than 0No
    validDurationDurationThe amount of time allocated quota remains valid before it isautomatically released. This is only meaningful for rate limit quotas.value should be 0 < validDurationNo
    bucketDurationDurationThe bucketDuration will be ignored if rateLimitAlgorithm is FIXED_WINDOWvalue should be 0 < bucketDuration < validDurationNo
    rateLimitAlgorithmQuotaAlgorithmQuota management algorithm. The default value is FIXED_WINDOWNo
    overridesOverride[]Overrides associated with this quota.The first matching override is applied.No

    Params.QuotaAlgorithm

    Algorithms for rate-limiting:

    NameDescription
    FIXED_WINDOWFIXED_WINDOW The fixed window approach can allow 2x peak specified rate, whereas the rolling-window doesn’t.
    ROLLING_WINDOWROLLING_WINDOW The rolling window algorithm’s additional precision comes at the cost of increased redis resource usage.