Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleSample Quota configuration in JSON
// Quotas for user1 (without sub-quotas)
{
    "version":1,
    "config": {
        "+total" : {"producer_byte_rate":"1024","consumer_byte_rate":"2048"}
    }
}
// Quotas for user2 (with sub-quotas)
{
    "version":1,
    "config": {
    "+total" : {"producer_byte_rate":"1024","consumer_byte_rate":"2048"},
    "clients": {
       "clientA" : {"producer_byte_rate":"10","consumer_byte_rate":"20"},
       "clientB" : {"producer_byte_rate":"30","consumer_byte_rate":"40"}
    }
} 

 

Quota Identifier

Quota configuration and metrics currently use client-id as the unique key, enforcing one quota for all clients with the same client-id. This will be replaced with a new quota-id. Each quota-id is associated with a pair of producer and consumer rate limits which may be config overrides or the default quota.  

...