Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60015

cbauth doesn't cache @prometheus user

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      Found while looking at https://issues.couchbase.com/browse/MB-59972

      in http_access_internal.log you can see this:

      127.0.0.1 - @prometheus [05/Dec/2023:11:47:33 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 1
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:33 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 0
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:33 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 1
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:34 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 1
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:34 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 0
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:35 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 1
      127.0.0.1 - @prometheus [05/Dec/2023:11:47:35 +0000] "POST /_cbauth HTTP/1.1" 200 46 - "Go-http-client/1.1" 0
      

      This clearly indicates cache misses

      Prometheus pings all the golang components on a node once in 5 seconds with the stats requests authenticating as @prometheus

      This user is no longer a "special user" (the ones with memcached password), so it goes through the same auth procedure as other users and in case of successful authentication the results should be cached by cbauth and POST /_cbauth should not be repeated until the password changes.

      In current version cbauth caches only "local" and "admin" domains, but the domain for @prometheus user is "stats_reader" therefore no caching and constant flow of unnecessary POST /_cbauth requests that create an unnecessary pressure on the system

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shaazin.sheikh Shaazin Sheikh
            artem Artem Stemkovski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty