Real-time analytics

The real-time analytics API offers a standardized set of data about traffic received by a specified service in one-second time periods up to the last complete second.

IMPORTANT: Unlike other Fastly APIs, the base URL for real-time analytics is

Data model

TimestampNumberValue to use for subsequent requests
DataArrayA list of records, each representing one second of time
Data.recordedNumberThe Unix timestamp at which this record's data was generated
Data.aggregatedObjectStatistics aggregated across all data centers
Data.datacenterObjectStatistics grouped by data center
Data.datacenter.{code}ObjectStatistics for a single data center

The keys are the same as those for historical stats, but they show some statistics that have occurred since the last request, including the following:

  • Number of requests
  • Number of bytes transmitted in headers
  • Number of bytes transmitted in bodies
  • Number of hits
  • Number of misses
  • Number of synthetic responses
  • Number of errors
  • Amount of time spent delivering hits
  • Amount of time spent delivering misses

The miss_histogram object is a histogram. Each key is the upper bound of a span of 10 milliseconds, and the values are the number of requests to origin during that 10ms period. Any origin request that takes more than 60 seconds to return will be in the 60000 bucket.


GET /v1/channel/:service_id/ts/:timestamp_in_seconds

Get real-time data for the last second. For the first request, the timestamp can be 0. The response will then return a new timestamp field which should be used for the next request.

GET /v1/channel/:service_id/ts/h

Get data for the 120 seconds preceding the latest timestamp available for a service.

GET /v1/channel/:service_id/ts/h/limit/:max_entries

Get data for the 120 seconds preceding the latest timestamp available for a service, up to a maximum of :max_entries entries.

Rate limiting

The real-time analytics API is rate limited internally. However, it is also cached behind Fastly with an expiration time of 1s. Under normal use there should be no reason for customers to hit that rate limit.