krconv commented on PR #7665:
URL: https://github.com/apache/hbase/pull/7665#issuecomment-3789831903

   Yes—our requirement is to set a specific request attribute to a value 
calculated from thread-local context.
   
   We use `hbase.quota.user.override.key` (which configures throttling to use a 
request attribute) to throttle based on a logical “upstream caller” rather than 
the connection user. For example, a high-volume nightly job 
(`EmailJobs-nightlyPurgeJob`) calls `ObjectsWebService-web`, which in this case 
is the component that actually holds the HBase `AsyncTable` client and issues 
deletes to a table `objects-1`. The service propagates the job identity via 
thread-local HTTP metadata and sets it as a request attribute so that the job 
is throttled independently, and can be slowed down without impacting user 
traffic and other lower-volume jobs. This matters because we share a single 
`AsyncTable` per table/JVM—without dynamic attributes, one noisy caller can 
cause throttling across all traffic handled by that service.
   
   This is exactly what we do with the `Table` client using the 
`RpcControllerFactory` as a workaround, and it works well in our experience. 
With the `AsyncTable` though, the `RpcControllerFactory` is called from various 
threads during retries, so we don't have a way to propagate any thread-local 
context reliably.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to