[ 
https://issues.apache.org/jira/browse/HBASE-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Purtell updated HBASE-2319:
----------------------------------

    Attachment: HBASE-2319.patch

Simple HTable backed token bucket for per-user rate limiting globally across a 
cluster with multiple Stargate instances running. Token refresh rate and limit 
(burst) are configurable. Configuration is periodically refreshed from the 
table, by default if the last check was longer than one minute prior.

One token is deducted for each user transaction with Stargate, additionally for 
each row in a prospective update and each row encountered while running a 
scanner. If an update is overlimit, it will be rejected as a while. If a 
scanner becomes overlimit, it will return early. The default allows up to 100 
operations burst and adds 10 tokens per second. 

Uses get+put with rowlock, so there will be contention on the row if multiple 
Stargate instances are serving the same user, and this requires three extra 
RPCs than ICV. However the notion of last update is maintained globally using 
the timestamp on the available tokens value for the user and ICV will 
necessarily not update a timestamp while the value is in memstore.

> [stargate] multiuser mode: traffic shaping
> ------------------------------------------
>
>                 Key: HBASE-2319
>                 URL: https://issues.apache.org/jira/browse/HBASE-2319
>             Project: Hadoop HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>             Fix For: 0.20.4, 0.21.0
>
>         Attachments: HBASE-2319.patch
>
>
> Simple token bucket strategy. Return "509 Bandwidth Limit Exceeded" when 
> request rate exhausts tokens.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to