Files
system-design-101/data/guides/which-latency-numbers-should-you-know.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

1.7 KiB
Raw Permalink Blame History

title, description, image, createdAt, draft, categories, tags
title description image createdAt draft categories tags
Which Latency Numbers Should You Know? Essential latency benchmarks for developers and system designers. https://assets.bytebytego.com/diagrams/0250-latency-numbers.jpg 2024-03-11 false
caching-performance
latency
performance

Please note those are not accurate numbers. They are based on some online benchmarks (Jeff Deans latency numbers + some other sources).

  • L1 and L2 caches: 1 ns, 10 ns

    E.g.: They are usually built onto the microprocessor chip. Unless you work with hardware directly, you probably dont need to worry about them.

  • RAM access: 100 ns

    E.g.: It takes around 100 ns to read data from memory. Redis is an in-memory data store, so it takes about 100 ns to read data from Redis.

  • Send 1K bytes over 1 Gbps network: 10 us

    E.g.: It takes around 10 us to send 1KB of data from Memcached through the network.

  • Read from SSD: 100 us

    E.g.: RocksDB is a disk-based K/V store, so the read latency is around 100 us on SSD.

  • Database insert operation: 1 ms

    E.g.: Postgresql commit might take 1ms. The database needs to store the data, create the index, and flush logs. All these actions take time.

  • Send packet CA->Netherlands->CA: 100 ms

    E.g.: If we have a long-distance Zoom call, the latency might be around 100 ms.

  • Retry/refresh internal: 1-10s

    E.g: In a monitoring system, the refresh interval is usually set to 5~10 seconds (default value on Grafana).

Notes

1 ns = 10^-9 seconds 1 us = 10^-6 seconds = 1,000 ns 1 ms = 10^-3 seconds = 1,000 us = 1,000,000 ns