The World Wide Web has expanded to make various services available to the consumer as online web application. Application Performance Management (APM) software exists to collect application and system specific performance metrics to help businesses determine the performance of their web-based systems.
The expansion of software systems in the modern era has created massively distributed systems hosted on hundreds of machines. The amount of performance metrics collected from such a massive system may run into billions of data points per day. If these data points are stored for couple of days for reporting and analysis the space requirement may run into terabytes or petabytes of data.
There is a need to provide for more efficient processing, storage and querying of metrics from such distributed systems.
The present technology provides for more efficient processing, storage and querying of metrics from a distributed system from which large volumes of metrics are collected. The present metrics processing system may store billions of performance metrics in a persistence storage system, such as an HBase storage system, for several days, with minimum space required and at the same time retaining a low level data granularity. For example, a minute level granularity may be retained for the high volume of metrics. The reporting queries may use a unique technique to find required metrics in the HBase persistence store using a portion of the key as a bit array. The present metrics processing system may user a very small number of keys, such as for example three keys, to store minute level metrics data for a metric for several hours. The metric values may be pivoted to three time-bucketed keys at different times during their life time in the system. In some instances, only a one key may exist in the system, with the data associated with a different key at different periods of time.
The present metric reporting system may store time series metric data in optimized time rolled up format for faster querying. The system may collect time series data in a maximum time granular level (for example one minute), and then aggregate or rollup the collected data into lower time granular levels. The present system may create multiple of these levels such that the reporting queries would use these levels to apply optimized queries.
An embodiment may include a method for processing metrics. A plurality of payloads which each include time series data may be received. A first time series data associated with a first time range may be stored with a first key. The first time series and at least one other time series data of the plurality of time series data associated with a second time range may be stored with a second key.
Another embodiment may include a method for processing metrics. A metric data for a metric type may be received. One or more groups of data associated with a time period for the metric type may be updated, wherein the groups are associated with at least two different periods of time. At least two groups associated with different periods of time may be provided in response to a query for metric data over a period of time.
Embodiments of the present system provide for more efficient processing, storage and querying of metrics from a distributed system from which large volumes of metrics are collected. The present metrics processing system may store billions of performance metrics in a persistence storage system, such as an HBase storage system, for several days, with minimum space required and at the same time retaining a low level data granularity. For example, a minute level granularity may be retained for the high volume of metrics. The reporting queries may us a unique technique to find required metrics in the HBase persistence store using a portion of the key as a bit array. The present metrics processing system may user a very small number of keys, such as for example three keys, to store minute level metrics data for a metric for several hours. The metric values may be pivoted to three time-bucketed keys at different times during their life time in the system. In some instances, at any point in time, only one key may exist in the system with a small overlap with the next key.
The present metric reporting system may store time series metric data in optimized time rolled up format for faster querying. The system may collect time series data in a maximum time granular level (for example one minute), and then aggregate or rollup the collected data into lower time granular levels. The present system may create multiple of these levels such that the reporting queries would use these levels to apply optimized queries.
Collector 170 may receive metric data and provide the metric data to one or more aggregators 180. Collector 170 may include one or more collector machines, each of which using a logic to transmit metric data to an aggregator 180 for aggregation. Aggregator 180 aggregates data and provides the data for reports to external machines.
The collectors may register with a quorum when they start up. In this manner, the quorum may determine when one or more collectors is not performing well and fails to register. In some embodiments, the metrics are sent from the agent to a collector in a table format, for example once per minute.
A persistence store may receive and store the data provided from the collectors to the aggregators. The received data may be stored using a key system, such that a minimal number of keys are used to store time series data sent to the persistence store.
Each aggregator may receive one or more metric types, for example two or three metrics. The metric information may include a sum, count, minimum, and maximum value for the particular metric. An aggregator may receive metrics having a range of hash values. The same metric type will have the same hash value and be routed to the same aggregator.
Aggregation may include, for each received metric, maintaining a plurality of buckets associated with time periods. The buckets may include, for example, a one minute, ten minute, and one hour bucket. Each bucket is updated upon receiving the corresponding metric, and queries for the metric may include a response which includes different sized buckets rather than a large amount of individual data.
Once aggregated, the aggregated data is moved into a cache 250. Data may be stored in cache 250 for a period of time and may eventually be flushed out. For example, data may be stored in cache 250 for a period of eight hours. After this period of time, the data may be overwritten with additional data.
The payloads may be persisted at step 320. To persist the payload, a collector may transmit the payload to a persistence store 230. The persistence store may then store the received payload of metrics. Storing the metrics may include storing the metrics with a particular key based on the time of the metric occurrence. Persisting metrics is discussed in more detail with respect to the method of
A collector may generate a hash for metrics in the payload at step 325. For each metric, the collector may perform a hash on the metric type to determine a hash value. The metrics may then be transmitted by the collectors to a particular aggregator based on the hash value. The aggregators receive the metrics based on the hash value at step 330.
The aggregators may aggregate the metrics at step 335. The metrics may be aggregated to determine the total number of metrics, a maximum, a minimum, and average value of the metric over a period of time. In some instances, the metrics may be aggregated in buckets associated with a period of time in which they occurred. For example, the buckets may include one minute increments, ten minute increments, and one hour increments. For details for aggregating metrics is discussed with respect to the method of
The aggregated metrics may then be stored in a cache at step 340. A controller or other entity may retrieve the aggregated metrics from the cache for a limited period of time.
The aggregated data may be provided in response to a request at step 345. A query for data for a particular time period may be received, and a response may be generated with blocks of data having a different size. For example, for a query that requests five and a half hours of data, the response to the query may include five one hour blocks of data, one or more ten minute blocks of data, and several one minute blocks of data. Details regarding providing aggregating data in response to a request is discussed in more detail below with respect to the method of
The metrics may be stored, eventually, in buckets associated with different time periods. The first time period is typically shorter than the second time period, the second time period is typically shorter than the third time period, and so on. In some instances, the first time period may be one minute.
A determination is made as to whether the first threshold period has ended at step 415. The first threshold period may be a period of time, for example then minutes. In this case, once a threshold of ten minutes has passed, then the data in the first timer period buckets (one minute buckets) is moved from a first key to a second key.
If the first threshold period has ended, the method continues to step 440. If the first threshold period has not ended, then a determination is made as to whether additional metrics are received at step 420. If no additional metrics are received, the method returns to step 415. If additional metrics are received, then the metrics are stored in accordance with a first time period bucket with the first key at step 425. Thus, if additional metrics are received before the first threshold period ends, a first time period bucket is created for those metrics.
In some embodiments, metrics are only stored for a first time period in which metrics are received. For example, if metrics are received during the 1st minute, 2nd minute, 5th minute and 20th minute, then a data entry is created and stored for each of those minutes and only those minutes.
After metrics are stored in the corresponding first time period bucket in which they are received, the method of
After the bitmap and byte array are stored with the second key, a determination is made as to whether the second threshold period ends at step 445. The second threshold period may be a period of ten minutes, an hour, or some other time period. If the second threshold period has ended, the method of
In
Once the second threshold period ends, bitmaps are combined for the second key into a single bitmap at step 460. The byte arrays for the second key are then combined into a single byte array and compressed into a new byte array at step 465. The new bitmap and the compressed byte array are then stored with the third key and a third period information at step 470. An example of the data format for data stored with a third key is illustrated in
If the received metric data does match existing aggregated data, the metric is added to the current first level bucket, second level bucket, and third level bucket at step 620. Adding the metric data to a particular bucket may include summing counts of the data, sorting the data to determine the overall minimum and overall maximum, and processing the data to determine the average of the data.
A determination is made as to whether the threshold time period for the second level bucket has expired at step 625. If the time period for the second level bucket has not expired, the method continues to step 635. If the threshold time period for the second level bucket has expired, then the second level bucket data is transmitted to the cache at step 630. Providing the data to cache makes the data available for requests by other entities and frees up memory space at the aggregator.
A determination is made as to whether the time period for the third level bucket has expired at step 635. If the time period has not expired, the method at
A determination is made as to whether the remaining time period encompasses level two blocks at step 820. If the remaining time period does not encompass any level two blocks, the method continues to step 830. If the remaining time period does encompass any level two blocks, those level two blocks are retrieved at step 825 and the method continues to step 830.
A determination is made as to whether there is any time period remaining at step 830. If there is no time period remaining for which to retrieve data, the retrieved blocks are provided in response to the request at step 840. If there is any time period remaining, the lowest level blocks, in this example level one blocks, are retrieved that encompass the remaining time period at step 835. Those level one blocks are then provided along with any other retrieved blocks in response to the request at step 840.
The computing system 900 of
The components shown in
Mass storage device 930, which may be implemented with a magnetic disk drive or an optical disk drive, is a non-volatile storage device for storing data and instructions for use by processor unit 910. Mass storage device 930 can store the system software for implementing embodiments of the present invention for purposes of loading that software into main memory 910.
Portable storage device 940 operates in conjunction with a portable non-volatile storage medium, such as a floppy disk, compact disk or Digital video disc, to input and output data and code to and from the computer system 900 of
Input devices 960 provide a portion of a user interface. Input devices 960 may include an alpha-numeric keypad, such as a keyboard, for inputting alpha-numeric and other information, or a pointing device, such as a mouse, a trackball, stylus, or cursor direction keys. Additionally, the system 900 as shown in
Display system 970 may include a liquid crystal display (LCD) or other suitable display device. Display system 970 receives textual and graphical information, and processes the information for output to the display device.
Peripherals 980 may include any type of computer support device to add additional functionality to the computer system. For example, peripheral device(s) 980 may include a modem or a router.
The components contained in the computer system 900 of
When implementing a mobile device such as smart phone or tablet computer, the computer system 700 of
The foregoing detailed description of the technology herein has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the technology to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the technology and its practical application to thereby enable others skilled in the art to best utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the technology be defined by the claims appended hereto.