bzp2010 commented on issue #11456:
URL: https://github.com/apache/apisix/issues/11456#issuecomment-2270328881

   Hi, @pavankumar-siripurapu.
   
   Although `prometheus` plugin allows you to inject additional labels, it is 
not feasible to set a field with a high cardinality like uri through a variable.
   
   For example, if you use any wildcard routes or variable routes, they will 
inflate the uri label indefinitely.
   
   For `apisix_http_status`, which stores things like `"code", "route", 
"matched_uri", "matched_host", "service", "consumer", "node", "status_code"`, 
assuming there are 10 possible values for each, and the uri has 100 possible 
values, this will eventually generate 10*10*10*10*10*10*10*10*100 active 
series, totaling 10 billion.
   This is an immeasurable drain on memory because you can't predict what data 
your customers will include in the API path. Therefore, 100 possible uri's is 
just a minimal prediction.
   
   In short, please don't include high cardinality values in labels, or 
strictly limit its range. Do not do this for global configurations in 
plugin_attr.


-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to