Commit Graph
17 Commits
Author SHA1 Message Date
Forrest aaee695927 node hb and watcher scalability improvements (#21490)
* node hb and watcher scalability improvements

* ensure that node has ample time to hb

* fix degraded state

* hbv2 test cov
2023-03-03 17:39:00 +00:00
Forrest Marshall 34bf5b2707 sharded jitters 2022-11-23 10:14:45 -08:00
Brian Joerger 4c0a6ff5b1 tsh PIV login integration (#15335)
* Add Yubikey PrivateKey implementation for use by Teleport clients.

  - Add yubikey login logic, reusing previously stored private keys.

  - Fix identity file decoding with PIV keys, which sign ecdsa certificates.

  - Add libpcsclite-dev pre-req for building on linux.

  - Remove unnecessary keys.Signer interface and move its functionality to keys.PrivateKey.

  - Move retry and jitter utils to new api/utils/retryutils package.
2022-09-23 19:44:10 +00:00
Forrest Marshall 7c9f26457a upgrade notifications 2022-08-31 12:09:30 -07:00
Forrest Marshall 6c02a4efd9 improve semaphore retries and tests 2022-07-13 11:19:18 -07:00
Forrest Marshall 31f258fec9 inventory control stream & certs 2022-06-15 22:26:24 -07:00
Zac Bergquist 2b94b2b777 Run LDAP initialization in a retry loop
Prior to this change, the entire Teleport process would crash if
it is unable to connect to LDAP on startup.

Instead, we perform retries so that the service doesn't fail if
an LDAP client cannot be initialized. Initialization failures could
occur due to temporary outages of the LDAP server, misconfiguration,
or because Teleport Enterprise is running and the auth server is not
licensed to generate Windows certs.

This has the added side effect of re-publishing the Windows CRL every
time we re-issue the LDAP client certificate, which will ensure it stays
up to date, even in the face of CA rotations.

Fixes #8527
2022-01-21 14:42:03 -07:00
rosstimothy 016b4e0814 Prevent Linear Retry from converging on Max (#9393)
Prior to this change, if the Duration of a Linear Retry was greater
than the configured Max, then the Max value would be returned - regardless
of whether or not a Jitter was provided. This modification applies any provided
Jitter to the Max value in the event that the calculated Duration is greater
than the Max.
2021-12-16 10:30:47 -05:00
Alex McGrath d67781d75f Exclude Jitter from logging
Jitter is a function so it doesnt have a reasonable json
representation.
2021-12-16 04:06:09 -08:00
Roman Tkachenko 58012cf376 Add Cloud SQL MySQL support (#7302) 2021-06-18 17:38:15 -05:00
Joel b2494bea8e Improve RFD 24 Dynamo migration efficiency and performance (#7012) 2021-05-27 22:19:56 +02:00
Forrest Marshall e118629367 improve cert rotation periodics
* Eliminates spurious leaf cluster CA writes.
* Adds jitters to various periodic operations.
2021-04-07 15:49:27 -07:00
Sasha Klizhentas 7b8bfe4f60 Backoff on network errors and mark corrupted records.
Uploader retries slower on network errors and picks the pace
after any upload has succeeded.

Records that were corrupted, will never get uploaded.

The uploader will create streams indefinitely, clogging the auth server
with streams. Now uploader writes marker for bad session uploads
and does not attempt to reupload.
2020-10-21 14:33:04 -07:00
Forrest Marshall ae2336dfd0 concurrent session control
Adds support for Concurrent Session Control and a new
semaphore API.  Roles now support two new configuration
options, `max_ssh_connections` and `max_ssh_sessions`
which correspond to the total number of authenticated
ssh connections per cluster, and the number of ssh sessions
within a connection respectively.  Attempting to exceed
these limits generate variants of the `session.rejected`
audit event and cause the connection/session to be
rejected.
2020-09-17 11:02:35 -07:00
Sasha Klizhentas 0f4e82548f Initial work on semaphores 2020-09-17 11:02:35 -07:00
Forrest Marshall 4e9eed9ac0 cache event fanout & reversetunnel improvements
- cache now perforams in-memory fanout of events, eliminating
spurious event generation due to cache init/reset.

- removed old unused logic from reversetunnel agents.

- replaced seekpool with simpler ttl-cache and semaphore-like
lease system.

- add jittered backoff to agent connection attempts to
reduce "thundering herd" effect.

- improved reversetunnel logging.

- improved LB usage in tests.
2020-04-23 14:03:52 -07:00
Sasha Klizhentas 8356ae6a74 Use in-memory cache for the auth server API.
This commit expands the usage of the caching layer
for auth server API:

* Introduces in-memory cache that is used to serve all
Auth server API requests. This is done to achieve scalability
on 10K+ node clusters, where each node fetches certificate authorities,
roles, users and join tokens. It is not possible to scale
DynamoDB backend or other backends on 10K reads per seconds
on a single shard or partition. The solution is to introduce
an in-memory cache of the backend state that is always used
for reads.

* In-memory cache has been expanded to support all resources
required by the auth server.

* Experimental `tctl top` command has been introduced to display
common single node metrics.

Replace SQLite Memory Backend with BTree

SQLite in memory backend was suffering from
high tail latencies under load (up to 8 seconds
in 99.9%-ile on load configurations).

This commit replaces the SQLite memory caching
backend with in-memory BTree backend that
brought down tail latencies to 2 seconds (99.9%-ile)
and brought overall performance improvement.
2019-04-12 14:23:09 -07:00