Enabling Railgun Stats

Enabling railgun stats will record global statistics for the Railgun listener and setup a listening endpoint for HTTP connections. To enable statistics reporting set stats.log to 1.

To enable reporting by use of an HTTP POST request of JSON data to the specified URL, set stats.url to a valid URL.stats.interval determines how frequently stats will be logged or POSTed in minutes.

Here is an example output from viewing stats:

    "delta_compression_ratio": 4552,
    "memstats.Frees": 78483728,
    "memstats.Mallocs": 80708595,
    "memstats.alloc": 2235213408,
    "memstats.heap_alloc": 2235213408,
    "memstats.heap_idle": 1157988352,
    "memstats.heap_in_use": 2562883584,
    "memstats.heap_objects": 2224867,
    "memstats.heap_released": 1157890048,
    "memstats.heap_sys": 3720871936,
    "memstats.lookups": 1313043,
    "memstats.num_gc": 92,
    "memstats.pause_ns": 185276,
    "memstats.stack_in_use": 46768128,
    "memstats.stack_sys": 47841280,
    "memstats.sys": 4026019808,
    "memstats.total_alloc": 12652595080,
    "recycler_cleans_chunk": 1,
    "recycler_cleans_hasher": 1,
    "recycler_give": 0,
    "recycler_queue_chunk": 9815,
    "recycler_queue_hasher": 2,
    "recycler_removed_chunk": 0,
    "recycler_removed_hasher": 0,
    "recycler_retained_chunk": 96621416,
    "recycler_retained_hasher": 173178,
    "recycler_tuned_chunk": 11957,
    "recycler_tuned_hasher": 81986,
    "requests_completed": 17487,
    "requests_started": 17589,
    "time": 1416343217,
    "uncompressed_chunks": 32601,
    "wan_bytes_sent": 624557633,
    "wan_starts": 667,
    "wan_stops": 23

The memstats fields derived from Golang recorded statistics from the memory allocator. The recycler statistics are from Railgun's memory recycler, which frees up memory for reuse.

Note: Conveyor is no longer used in the current version of Railgun, so conveyor will no longer be present

Log fields

The below fields are important to review when troubleshooting Railgun issues.

bytes_retrieved: the number of bytes retrieved by the rg-listener from the origin web server for the request.

delta_compression_ratio: the average compression achieved for requests served by Railgun where a ratio of 1 means 99.99% and 10000 means 0% compression.

requests_completed: the number of HTTP requests successfully handled by the rg-listener.

requests_started: the number of HTTP requests received by the rg-listener.

uncompressed_chunks: Refers to data sent from the rg-listener to the rg-sender with no compression done by Railgun. This means the content either was previously compressed, or no change was present so no data was sent.

wan_bytes_sent: the number of bytes sent from the rg-listener to the rg-sender. This includes both compressed and uncompressed data.

wan_starts: the number of times a WAN connection was initialized between the rg-sender (installed at each Cloudflare datacenter) and the rg-listener (installed at your origin).

wan_stops: the number of times a WAN connection was closed between the rg-sender (installed at each Cloudflare datacenter) and the rg-listener (installed at your origin).



Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk