Grokking ExpressJS
0% completed
Caching Responses with Redis
On the test machine, the first request for task 1 took 189 ms, and the same request a moment later took 5 ms. Nothing in the server changed between the two requests. The first one read the task from the database, and the second one read a copy that the first had saved in Redis.
Keeping a fast copy of answers that are requested again and again is called caching. Load balancing lets more requests run at the same time, and caching makes each request cheaper. The two are connected
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%