Memory vs disk vs network — the latency ladder
Lesson~11 minStep 1 of 8- Predict (current)
- Name the parts
- Explain
- Explain 2
- Explain 3
- Explain 4
- Check
- Wrap up
This line is about keeping copies of data where they're quick to read. It starts with Pixel, the photo-sharing app from the Scale line.
Pixel's photo page shows a photo, who posted it, and its comments. The team times one page. Pixel's own code, on an app server reading that server's memory, needs about 0.05 ms. The rest of the time the page waits on the database — its own server in the same cloud region, keeping the photo details on a spinning hard disk.
Where does the time go, and where should a copy of the most-asked-for details live? Start with a guess.
Pixel's app server and its database server sit in the same cloud region. About how long does one round trip to the database take, next to one read from the app server's own memory?
This one is reading and questions — no simulation.