Skip to content

Commit

Permalink
Merge branch 'main' into wm/clarify-ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
kflynn authored Jun 23, 2023
2 parents b9c273b + 8aff8c3 commit 41b3d02
Show file tree
Hide file tree
Showing 205 changed files with 1,873 additions and 6,671 deletions.
45 changes: 0 additions & 45 deletions linkerd.io/.forestry/front_matter/templates/blog-detail-page.yml

This file was deleted.

23 changes: 0 additions & 23 deletions linkerd.io/.forestry/front_matter/templates/dashboard.yml

This file was deleted.

27 changes: 0 additions & 27 deletions linkerd.io/.forestry/front_matter/templates/hero.yml

This file was deleted.

15 changes: 0 additions & 15 deletions linkerd.io/.forestry/front_matter/templates/related-content.yml

This file was deleted.

47 changes: 0 additions & 47 deletions linkerd.io/.forestry/front_matter/templates/schema-faq.yml

This file was deleted.

62 changes: 0 additions & 62 deletions linkerd.io/.forestry/front_matter/templates/schema-video.yml

This file was deleted.

61 changes: 0 additions & 61 deletions linkerd.io/.forestry/settings.yml

This file was deleted.

1 change: 0 additions & 1 deletion linkerd.io/.forestry/snippets/asciinema.snippet

This file was deleted.

1 change: 0 additions & 1 deletion linkerd.io/.forestry/snippets/twitter.snippet

This file was deleted.

1 change: 0 additions & 1 deletion linkerd.io/.forestry/snippets/youtube.snippet

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
+++
title = "Configuring Proxy Discovery Cache"
description = "Changing proxy discover cache timeouts when using slow clients."
+++

The Linkerd proxy maintains in-memory state, such as discovery results, requests
and connections. This state is cached to allow the proxy to process traffic more
efficiently. Cached discovery results also improve resiliency in the face of
control plane outages.

To ensure the CPU and memory footprint is low, cached entries are dropped if
they go unused for some amount of time. If an entry is not referenced within the
timeout, it will be evicted. If it is referenced, the timer resets.

These timeouts are handle via these two config values:

- `proxy.outboundDiscoveryCacheUnusedTimeout`: Defines the eviction timeout for
cached service discovery results, connections and clients. Defaults to `5s`.
- `proxy.inboundDiscoveryCacheUnusedTimeout`: Defines the eviction timeout for
cached policy discovery results. Defaults to `90s`.

These values can be configured globally (affecting all the data plane) via Helm
or the CLI at install/upgrade time, or with annotations at a namespace or
workload level for affecting only workloads under a given namespace or specific
workloads.

## Configuring via Helm

When installing/upgrading Linkerd via [Helm](../install-helm/), you can use the
`proxy.outboundDiscoveryCacheUnusedTimeout` and
`proxy.inboundDiscoveryCacheUnusedTimeout` values. For example:

```bash
helm upgrade linkerd-control-plane \
--set proxy.outboundDiscoveryCacheUnusedTimeout=60s \
--set proxy.inboundDiscoveryCacheUnusedTimeout=120s \
linkerd/linkerd-control-plane
```

## Configuring via the Linkerd CLI

As with any Helm value, these are available via the `--set` flag:

```bash
linkerd upgrade \
--set proxy.outboundDiscoveryCacheUnusedTimeout=60s \
--set proxy.inboundDiscoveryCacheUnusedTimeout=120s \
| kubectl apply -f -
```

## Configuring via Annotations

You can also use the
`config.linkerd.io/proxy-outbound-discovery-cache-unused-timeout` and
`config.linkerd.io/proxy-inbound-discovery-cache-unused-timeout` annotations at
the namespace or pod template level:

```yaml
kind: Deployment
apiVersion: apps/v1
metadata:
name: my-deployment
# ...
spec:
template:
metadata:
annotations:
config.linkerd.io/proxy-outbound-discovery-cache-unused-timeout: '60s'
config.linkerd.io/proxy-inbound-discovery-cache-unused-timeout: '120s'
# ...
```

Note that these values need to be present before having injected your workloads.
For applying to existing workloads, you'll need to roll them out.

## When to Change Timeouts

In the vast majority of cases the default values will just work. You should
think about experimenting with larger values when using slow clients (5 RPS or
less across two or more replicas) where clients would experience unexpected
connection closure errors as soon as the control plane comes down. A higher
cache idle timeout for discovery results can help mitigating these problems.
6 changes: 4 additions & 2 deletions linkerd.io/content/2-edge/tasks/distributed-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ extension specifying the service exposing the Jaeger UI. By default, this would
be something like this:

```bash
linkerd viz install --set jaegerUrl=jaeger.linkerd-jaeger:16686
linkerd viz install --set jaegerUrl=jaeger.linkerd-jaeger:16686 \
| kubectl apply -f -
```

## Cleanup
Expand Down Expand Up @@ -186,7 +187,8 @@ collector:
exporters:
jaeger:
endpoint: my-jaeger-collector.my-jaeger-ns:14250
insecure: true
tls:
insecure: true
service:
extensions: [health_check]
pipelines:
Expand Down
Loading

0 comments on commit 41b3d02

Please sign in to comment.