Skip to content

Commit 79f5835

Browse files
author
Fabien Coelho
committed
cache hierarchy
1 parent bc2f85e commit 79f5835

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/EXPLANATIONS.md

+26
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@ Caching is a key component of any significant Web or REST backend so as to avoid
44
performance issues when accessing the storage tier, in term of latency,
55
throughput and resource usage.
66

7+
## Cache Hierarchy
8+
9+
In a modern web or mobile application, caching may take place at multiple
10+
levels to hide the fundamental sluggishness of network and database/disk
11+
accesses to permanent, reliable and transactional storage, mostly due to
12+
latency:
13+
14+
- at the web application level, `SWR` and `redux` are libraries designed
15+
to hide the latency of accessing remote datai, et by providing _stale_
16+
data while waiting for updates or keeping a local state.
17+
- at the web browser level, honoring HTTP `Cache-Control` headers helps
18+
the application avoiding actual HTTP request.
19+
- at the HTTP server/proxy level, response may be cached with specific
20+
modules, such as `mod_cache` for Apache.
21+
- at the server application level, say a Python Flask back-end in Python,
22+
CacheTools and CacheToolsUtils can help maintain efficient data accesses,
23+
possibly using multilevel in-memory distributed caches such as Redis or
24+
Memcached.
25+
- at the application architectural level, services such as elasticache
26+
can hide data accesses and indexing, in effect replicating the entire
27+
underlying database.
28+
- within the database itself, accesses to raw data are cached in shared
29+
memory, both at the OS and database level.
30+
- at the the hardware level, storage can benefit from différent
31+
levels of caches.
32+
733
## Shared Cache
834

935
A convenient setup is to have *one* shared cache storage tier at the

0 commit comments

Comments
 (0)