CDN Cache Efficiency

Shared by
Alok Aggarwal

Raw CDN Log data is imported from a .json file via a file ingest, and a node is created for each log line. Standing queries map log data into the Quine streaming graph, creating graph nodes for each PoP, ASN, cache server and asset. Each of those nodes increments with a counter to track the number of cache hits and misses and calculates hit/miss ratios as data is ingested. Selecting any node (PoP, ASN…) allows you to query for associated ASNs and CDN cache servers to identify potential root cause of poor performance. Thresholds are set to create qualitative `state` properties on each node indicating the health of the component as `good`, `warn`, or `alarm`. Node appearance properties are set to add icons and colors to represent the type of node and it’s `state`, respectively, in the exploration UI.


  • Sample data expanded from 25K to 50k lines- download cdn_data_50k.json
  • Moved all the standing queries into the ingest.
  • Optimized the manifestation of nodes.  
  • Added client device nodes.  
  • Added quick queries to perform efficiency calculations.  
  • Updated code to reflect Cypher best practices.

NOTE: This recipe uses reify.time and requires Quine 1.2.0 or later.

To run this recipe:
$ wget
java -jar quine-x.x.x.jar -r cdn --recipe-value in_file=cdn_data_50k
Download quine
Recipe code: