![]() Show all quotas and filter by table or namespace: hbase> list_quotas TABLE => 'myTable'Įxamples of Updating and Deleting Throttle Quotas Hbase> list_quotas USER => 'bob.*', NAMESPACE => 'ns.*' Show all quotas applied to user bob and filter by table or namespace: hbase> list_quotas USER => 'bob.*', TABLE => 't1' Show all quotas applied to user bob: hbase> list_quotas USER => 'bob.*' Limit requests based on type, regardless of users, namespaces, or tables: hbase> set_quota TYPE => THROTTLE, THROTTLE_TYPE => WRITE, TABLE => 't1', LIMIT => '10M/sec' Limit request to tables: hbase> set_quota TYPE => THROTTLE, TABLE => 't1', LIMIT => '10M/sec' Limit request to namespaces: hbase> set_quota TYPE => THROTTLE, NAMESPACE => 'ns1', LIMIT => '10req/sec' Issue unlimited requests for other tables, regardless of type of operation: hbase> set_quota TYPE => THROTTLE, USER => 'u1', TABLE => 't2', LIMIT => '5K/min' Limit user u1 to 5 KB/second for all operations on table t2. Still issue unlimited reads: hbase> set_quota TYPE => THROTTLE, THROTTLE_TYPE => WRITE, USER => 'u1', LIMIT => '10M/sec' Still issue unlimited writes: hbase> set_quota TYPE => THROTTLE, THROTTLE_TYPE => READ, USER => 'u1', LIMIT => '10req/sec' Limit user u1 to 10 requests/second globally for read operations. Limit user u1 to up to 10MB of traffic per second globally: hbase> set_quota => TYPE => THROTTLE, USER => 'u1', LIMIT => '10M/sec' Limit user u1 to 10 requests per second globally: hbase> set_quota => TYPE => THROTTLE, USER => 'u1', LIMIT => '10req/sec' Listing throttle quotas commands, and updating and deleting throttle quotas Selected header was not sent by the client or the configured service was not found.Following examples details the usage of adding throttle quotas commands, This can happen for several reasons, such as the To limiting usage by identifying the IP address. When the selected policy cannot be retrieved, the plugin falls back Inaccuracies and preventing scaling problems. The load balancer ensures that a user is always directed to the same Kong node, thus reducing To minimize inaccuracies, consider using a consistent-hashing load balancer in front of If you see too many false negatives, increase the limit. So, adjust your limits when scaling.įor example, if a user can make 100 requests every second, and you have anĮqually balanced 5-node Kong cluster, setting the local limit to something like 30 requests every second When the cluster scales down, the probability of false negatives increases. As the cluster scales to more nodes, more user requests are handled. You might need to experiment a littleīefore you get a setting that works for your scenario. If accuracy is of lesser importance, choose the local policy. This might not be a problem with short-lived metrics (for example, seconds or minutes)īut if you use metrics with a longer time frame (for example, months), plan You could start with the cluster policy, and move to redisĭo remember that you cannot port the existing usage metrics from the data store to Redis. Consider the support effort you might needįor Redis, and then choose either cluster or redis. In this scenario, because accuracy is important, the local policy is not an option. Only Kong Gateway Enterprise customers can use Redis Sentinel with Kong Rate Limiting, enabling them to deliver highly available primary-replica deployments. Note: Enterprise-Only: The Kong Community Edition of this Rate Limiting plugin does not Only to protect backend services from overloading that’s caused either by specific An example is a transaction with financial Bigger performance impact than a local policy. Therefore, relatively, the biggest performance impact.Īccurate, less performance impact than a cluster policy. Unless there’s a consistent-hashing load balancer in front of Kong, it diverges when scaling the number of nodes.Īccurate, no extra components to support.Įach request forces a read and a write on the data store. Depending on the environmental network setup, the trusted_ips Nginx property may also need to be configured to include the load balancer IP address. If a different header name is required, it needs to be defined using the real_ip_header Nginx property. In most cases, the header has a name of X-Real-IP or X-Forwarded-For.īy default, Kong uses the header name X-Real-IP. ![]() The IP address is determined by the request header sent to Kong from downstream. If limiting by IP address, it’s important to understand how the IP address is determined. Implementation considerations Limit by IP Address The headers RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset are based on the Internet-Draft RateLimit Header Fields for HTTP and may change in the future to respect specification updates.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |