metering

Apache HttpClient: Limit total calls per second

血红的双手。 提交于 2019-12-12 04:23:29
问题 I need to limit the number of HTTP calls per second to max 10. This is as per the allowed quota. Does HttpClient has some feature for this? Or any custom implementation would also do. 回答1: You might try the ScheduledThreadPoolExecutor. From the javadoc: A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically You would simply use the schedule method and pass it a Runnable , where the Runnable makes your call via the HttpClient . You

ELK stack for storing metering data

北城以北 提交于 2019-12-08 04:28:32
问题 In our project we're using an ELK stack for storing logs in a centralized place. However I've noticed that recent versions of ElasticSearch support various aggregations. In addition Kibana 4 supports nice graphical ways to build graphs. Even recent versions of grafana can now work with Elastic Search 2 datasource. So, does all this mean that ELK stack can now be used for storing metering information gathered inside the system or it still cannot be considered as a serious competitor to