Why gorouter generates massive metrics
search cancel

Why gorouter generates massive metrics

book

Article ID: 405439

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

On a platform with multiple gorouter and many active apps, gorouter generates very large number of logs + metrics (gauge and counter). 

For example, in a medium scale platform. output of `cf log-meta` indicate that gorouters generate 1M line of logs and metric in 35 seconds.  

$ cf log-meta
Retrieving log cache metadata as admin...

Source           Source Type  Count   Expired     Cache Duration
...
gorouter         platform   1000000   562733143    35s
...

This could cause significant loss rate on reverse_log_proxy.

Cause

By default, gorouter emits per-request metrics, on a platform with many active apps, massive metrics can be generated and emitted per second. 

Resolution

If the per-request metrics from gorouter is not required and it causes significantly high loss rate on reverse_log_proxy, you can disable or partly disable the feature at, 

  • Ops Manager > Tanzu Platform for Cloud Foundry > Setting > Networking > The per-request metrics that the Gorouter emits.

by changing the configuration from "Report all per-request metrics" to "Report some per-request metrics" and choose some of the available options based on need. Choosing all options is identical to "Report all per-request metrics". 

  • Latency and route lookup time metrics
  • HttpStartStop server metrics
  • HttpStartStop client metrics