kth.sePublications KTH
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Analys av cacheprestanda och TTL-strategier i mikrotjänstarkitekturer
KTH, School of Engineering Sciences in Chemistry, Biotechnology and Health (CBH), Biomedical Engineering and Health Systems, Health Informatics and Logistics.
KTH, School of Engineering Sciences in Chemistry, Biotechnology and Health (CBH), Biomedical Engineering and Health Systems, Health Informatics and Logistics.
2025 (Swedish)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
Analysis of Cache Performance and TTL Strategies in Microservice Architectures (English)
Abstract [sv]

I moderna webbsystem byggda med mikrotjänster är effektiv cachehantering avgörande för att minimera svarstider, nätverkstrafik och CPU-belastning. En vanlig metod är att använda en livslängdsparameter (TTL) för att styra hur länge data sparas icacheminnet, men statiska TTL-värden kan skapa problem om de inte anpassas efterförändrade åtkomstmönster. Detta examensarbete undersöker hur olika TTL-strategier påverkar API-prestanda och resursanvändning i en mikrotjänstliknande miljö.Fyra olika strategier implementerades och jämfördes: statisk TTL, belastnings- ochinnehållsbaserad TTL, sliding window TTL samt en hit-rate-baserad TTL. Resultatenvisar att statisk TTL gav högst cacheträffprocent och stabila svarstider i en relativtförutsägbar miljö, medan adaptiva strategier presterade bättre vid varierande trafikgenom att justera TTL-värden och därmed förbättra cacheeffektiviteten. Slutsatsenär att valet av TTL-strategi bör anpassas efter systemets specifika krav på prestanda,flexibilitet och resursutnyttjande.

Abstract [en]

In modern web systems built with microservices, efficient cache management is crucial for minimizing response times, network traffic, and CPU load. A commonmethod is to use a time-to-live (TTL) parameter to control how long data is stored inthe cache, but static TTL values can create problems if they are not adapted to changing access patterns. This thesis investigates how different TTL strategies affect APIperformance and resource usage in a microservice-like environment. Four differentstrategies were implemented and compared: static TTL, load- and content-basedTTL, sliding window TTL, and hit-rate-based TTL. The results show that static TTLachieved the highest cache hit rate and stable response times in a relatively predictable environment, while adaptive strategies showed potential in more dynamic traffic patterns. The conclusion is that the choice of TTL strategy should be adapted tothe system’s specific requirements for performance, flexibility, and resource utilization. 

Place, publisher, year, edition, pages
2025.
Series
TRITA-CBH-GRU ; 2025:103
Keywords [en]
Adaptive TTL, Cache hit rate, Cache management, CPU load, K6 load testing, Latency, Microservice architecture, Performance testing, Redis, REST API, Static TTL, Time-To-Live (TTL)
Keywords [sv]
Adaptiv TTL, Cacheträffsfrekvens, Cachehantering, CPU-belastning, K6 belastningstest, Latens, Mikrotjänstarkitektur, Prestandatestning, Redis, REST-API, Statiskt TTL, Time-To-Live (TTL)
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:kth:diva-364367OAI: oai:DiVA.org:kth-364367DiVA, id: diva2:1967553
Educational program
Bachelor of Science in Engineering - Computer Engineering
Supervisors
Examiners
Available from: 2025-06-12 Created: 2025-06-11 Last updated: 2025-06-12Bibliographically approved

Open Access in DiVA

fulltext(818 kB)76 downloads
File information
File name FULLTEXT01.pdfFile size 818 kBChecksum SHA-512
42572687251407713809b4566740dd39b737cb5a51f74341c339b47ec9bf8e1ac57a61f8c8e288441db35924d26d1b6d6b11d11bc2e24430e484f37905382f0b
Type fulltextMimetype application/pdf

By organisation
Health Informatics and Logistics
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 76 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 225 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf