cortex-helm-chart icon indicating copy to clipboard operation
cortex-helm-chart copied to clipboard

Decide between dns and dnssrvnoa when connecting to memcached

Open friedrichg opened this issue 5 months ago • 1 comments

Also @friedrichg you guys over at jsonnet use dnssrvnoa I believe for DNS service discovery, while we here use dns. Should we change that?

Originally posted by @nschad in https://github.com/cortexproject/cortex-helm-chart/issues/551#issuecomment-3178663195

friedrichg avatar Aug 12 '25 16:08 friedrichg

Services in cortex-jsonnet expose more than 1 port.

apiVersion: v1
kind: Service
metadata:
  labels:
    name: memcached-index-queries
  name: memcached-index-queries
  namespace: default
spec:
  clusterIP: None
  ports:
  - name: memcached-client
    port: 11211
    targetPort: 11211
  - name: exporter-http-metrics
    port: 9150
    targetPort: 9150
  selector:
    name: memcached-index-queries

But flag uses the port in the url.

https://github.com/cortexproject/cortex-jsonnet/blob/c99aab2b2aca15b54648875a60a20869e91eb018/cortex/tsdb-config.libsonnet#L41

https://github.com/cortexproject/cortex-helm-chart/blob/706f1908b469c6597a301766ae62a794c9321512/templates/_helpers.tpl#L90

I think having a separate service for memcached metrics is more sound when having large number of memcacheds servers, we don't want to reach endpoint capacity in the service endpoints when using dns.


I will do a couple of more tests before suggesting a change

friedrichg avatar Aug 12 '25 17:08 friedrichg