TTL
How long a stored item, such as a session, token or cache entry, stays valid before it expires.
In more detail
TTL stands for time to live. Short TTLs limit the damage from a stolen token and keep caches fresh, at the cost of more renewals. In DNS, a TTL of 300 means resolvers may reuse an answer for up to five minutes, so a change takes up to that long to reach everyone. IP packets also carry a TTL, a hop counter that stops packets looping forever.
Examples
The course's vault.get takes ttl=30 seconds and the workload token lives for twenty.name=www ttl=300 remaining=120 source=cache shows a cached answer with two minutes left.Related terms
- secret lease — A borrowed copy of a secret that comes with an end time, after which it must not be used and a fresh copy must be fetched.
- temporary security credentials — Cloud credentials that expire on their own after minutes or hours, issued when a role is assumed.
- DNS cache — Stored DNS answers that resolvers and hosts reuse until their TTL runs out, instead of asking the authoritative server again.
- DNS record — One typed entry in DNS, such as an A record mapping a name to an address, with a name, a type, a value and a TTL.
- recursive resolver — A DNS server that answers clients by following referrals from the root to the authoritative server, then caches the result.
- session — A record the server keeps about a logged-in caller, found on each request through a handle the client presents, usually in a cookie.
- access token — A generated string that proves who you are to a service, used instead of a password and revocable on its own.
- cache — A store of earlier answers kept close to where they are needed so they can be reused instead of fetched or computed again.
- expiry — The automatic removal of data once its time to live has passed.
- cache invalidation — Marking cached copies as out of date, or deleting them, when the real data changes so the next read fetches fresh data.
- jitter — A random amount added to or taken from a retry delay so that many clients do not all retry at the same moment.
- mass expiry — Many cache keys expiring at the same moment because they were written together with the same time to live.
- in-memory cache — A store in the program's memory that keeps recently fetched values so they can be reused without asking the original source again.
Taught in
- High Availability Across Tiers: What Fails Over By Itself? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Who Signs In: Identity Center, STS And Cognito — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Protecting Data: Versions, Object Lock, Backups And Secrets — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Route 53 Routing: Where Does A Fan In Lagos Land? — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Database Performance: Caches, Proxies And Capacity Units — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Network Performance: Peering, Transit Gateway And The Edge — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Long-Stem Clinic: The Phrase That Decides — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Design And Build: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Container Logs — Certified Kubernetes Application Developer (CKAD) Exam Prep
- The Two A.M. Page — CompTIA Cloud+ (CV0-004) Exam Prep
- Deployment Sprint: A Plan That Deletes The App Server — CompTIA Cloud+ (CV0-004) Exam Prep
- Fine From Home, Broken At The Office: Network Troubleshooting — CompTIA Cloud+ (CV0-004) Exam Prep
- A Padlock Warning On Monday: Troubleshooting Security — CompTIA Cloud+ (CV0-004) Exam Prep
- Troubleshooting Sprint: Three Tickets, One Morning — CompTIA Cloud+ (CV0-004) Exam Prep
- Exam On Thursday: The PBQ Clinic And Final Review — CompTIA Cloud+ (CV0-004) Exam Prep
- Session Architecture: HTTP-Only Cookies vs Tokens — Production Full-Stack Engineering
- OAuth2 & OpenID Connect: Social Auth & PKCE Flows — Production Full-Stack Engineering
- JWT Verification: Asymmetric Keys & Refresh Rotation — Production Full-Stack Engineering
- Distributed Cache Invalidation: Redis & Tagged Purging — Production Full-Stack Engineering
- DNS Resolution, End To End — Linux Fundamentals & Systems Administration
- Record Types, Caching And Time To Live — Linux Fundamentals & Systems Administration
- Moving To A Secret Manager — Application Security & Threat Modeling for Engineers
- Workload Identity — Application Security & Threat Modeling for Engineers
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture
- Cache Invalidation And The Three Hard Cases — Scalable System Design & Distributed Architecture
- Generic Interfaces, Classes And Type Aliases — Production TypeScript
- Sensitive Data, Ephemeral Values And Secrets From Vault — HashiCorp Terraform Associate (004) Exam Prep
References
- HashiCorp Vault: lease TTL
- RFC 1035: Domain names, implementation and specification
- RFC 2181: Clarifications to the DNS Specification
- MDN Glossary: TTL
- Redis: EXPIRE
Certification courses
- AWS DevOps Engineer Professional course and practice exam: DOP-C02
- AWS Solutions Architect Associate course and practice exam: SAA-C03
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CompTIA Cloud+ course and practice exam: CV0-004
- Terraform Associate course and practice exam: HashiCorp Terraform Associate (004)