Skip to content

Cluster healthcheck uses wrong interval due to metric filtering #8771

Open

Description

@ivanpondal

Given an Envoy v1.11.1 node with cluster metrics excluded via StatsMatcher and cluster health checking enabled, when sending traffic to the cluster healthcheck is always run with no_traffic_interval 60s default interval.

The cause is the same as with #8473 and #8630, metrics are being used for application functionality.

In this case upstream_cx_total is the metric on which the dependency exists. Therefore the workaround is to whitelist it:

stats_config:
 stats_matcher:
  inclusion_list:
    patterns:
    - suffix: upstream_cx_total

Activity

  1. added this to the 1.13.0 milestone on Nov 1, 2019
  2. ivanpondal commented on Nov 20, 2019

    @ivanpondal
    Author

    Working on our xDS control plane, we found blacklisting active_clusters and warming_clusters prevents Envoy from requesting new cluster updates.

  3. modified the milestones: 1.13.0, 1.14.0 on Dec 6, 2019
  4. mattklein123 commented on Jan 30, 2020

    @mattklein123
    Member

    @wgallagher will take a look at #8771 (comment) once he finishes the big xDS refactor he is currently working on.

  5. added a commit that references this issue on Jan 30, 2020
  6. dfjones commented on Jan 31, 2020

    @dfjones
    Contributor

    In #9856 I show that this issue affects Envoy 1.13.0 and can still cause xDS deadlock.

  7. modified the milestones: 1.14.0, 1.15.0 on Mar 18, 2020
  8. modified the milestones: 1.15.0, 1.16.0 on Jun 24, 2020
  9. removed this from the 1.16.0 milestone on Jun 30, 2020
  10. antoniovicente commented on Nov 10, 2020

    @antoniovicente
    Contributor
  11. htuch commented on Nov 12, 2020

    @htuch
    Member

    There are multiple approaches to fix this:

    1. Document and add validation check to disallow excluding core stats with stats matcher. This removes some flexibility from the stats matching, but there's probably not that many stats in this category.
    2. We could avoid relying directly on stats in methods like ClusterManagerImpl::warmingClusterCount(). This means we need to do double accounting to track things like warming cluster count.
    3. The stats code could avoid rejecting core stats and filter only at stats output time. I'm not sure how hard this would be to do, @jmarantz thoughts?
  12. jmarantz commented on May 18, 2022

    @jmarantz
    Contributor

    xref #14610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions