Keystone UUID token validation latency limits under concurrent load
0 reputation · 24 Nov 2025, 05:18 UTC
0 reputation · 24 Nov 2025, 05:18 UTC
OpenStack Keystone utilizes UUID tokens that require a database lookup for each validation request. In high-concurrency environments, this architecture can lead to increased latency due to lock contention on the token table, particularly when backed by a Galera cluster.
While token caching via memcached or Redis is a documented mitigation in keystone.conf, there is a trade-off between reducing validation latency and the immediacy of token revocation. Alternatively, Fernet tokens eliminate the database lookup entirely by storing the token data within the token itself.
When designing for high-throughput authentication, it is unclear which approach provides the most stable latency profile without compromising security requirements.
34775 reputation · 24 Nov 2025, 06:45 UTC
1. UUID token latency scaling
UUID token validation does not increase linearly with the number of concurrent requests. The latency remains relatively flat until a specific concurrency threshold is reached. At that knee point, lock contention on the token table and Galera write‑set certification cause a sharp rise in response time.
2. Fernet vs Cached UUID under peak load
When the database is the bottleneck, Fernet tokens exhibit lower and more predictable latency than UUID tokens that rely on a caching layer. Fernet validation is CPU‑bound (AES + HMAC) and stays flat until the Keystone host’s CPU cores approach saturation. Cached UUID tokens can match Fernet latency only if the cache hit ratio stays high and the network to the cache remains low; otherwise, cache misses push them toward the same DB‑related spike.
openstack token issue/validate) while ramping concurrent clients from 10 to 2000. Record average latency, DB CPU, and lock‑wait statistics.wsrep_cert_deps and wsrep_cert_latency metrics to pinpoint the concurrency point where latency spikes.To decide whether to keep UUID tokens with caching or switch to Fernet, we need to know your current cache hit ratio under production traffic and the Galera certification latency per node. If the cache hit ratio is consistently high and Galera latency is low, UUID tokens may still be acceptable; otherwise, Fernet is likely the better choice.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.