teleport/lib/cache
Sasha Klizhentas a22f7be365 Adds in-memory cache option, improves scalability for IOT mode.
This commit resolves #3227

In IOT mode, 10K nodes are connecting back to the proxies, putting
a lot of pressure on the proxy cache.

Before this commit, Proxy's only cache option were persistent
sqlite-backed caches. The advantage of those caches that Proxies
could continue working after reboots with Auth servers unavailable.

The disadvantage is that sqlite backend breaks down on many concurrent
reads due to performance issues.

This commit introduces the new cache configuration option, 'in-memory':

```yaml
teleport:
  cache:
    # default value sqlite,
    # the only supported values are sqlite or in-memory
    type: in-memory
```

This cache mode allows two m4.4xlarge proxies to handle 10K IOT mode connected
nodes with no issues.

The second part of the commit disables the cache reload on timer that caused
inconsistent view results for 10K displayed nodes with servers disappearing
from the view.

The third part of the commit increases the channels buffering discovery
requests 10x. The channels were overfilling in 10K nodes and nodes
were disconnected. The logic now does not treat the channel overflow
as a reason to close the connection. This is possible due to the changes
in the discovery protocol that allow target nodes to handle missing
entries, duplicate entries or conflicting values.
2020-02-06 09:16:48 -08:00
..
cache.go Adds in-memory cache option, improves scalability for IOT mode. 2020-02-06 09:16:48 -08:00
cache_test.go Add support for access request resource to cache (#3213) 2019-12-19 14:14:22 -08:00
collections.go Add support for access request resource to cache (#3213) 2019-12-19 14:14:22 -08:00
doc.go Use in-memory cache for the auth server API. 2019-04-12 14:23:09 -07:00