- Content-addressed: a snippet id comes from its body. So posting is
idempotent — the same command always gets the same id, so you never
get duplicates.
- Snippets never change, so I cache them at the edge (now 1 day). I can
make this longer with no risk, because the id depends on the content.
- Search results are cached at the edge for a short window (about a
minute). Under load, many people searching the same term hit the cache
instead of the database.
- Because of this caching, many reads can be served from the edge instead
of my server. That helps keep it cheap to run.
- "Editing" just creates a new snippet with a new id. Nothing is changed.
- No accounts, no auth. An id just comes from the content, so there is
nothing to own or protect.
korotinm•6m ago
- Content-addressed: a snippet id comes from its body. So posting is idempotent — the same command always gets the same id, so you never get duplicates. - Snippets never change, so I cache them at the edge (now 1 day). I can make this longer with no risk, because the id depends on the content. - Search results are cached at the edge for a short window (about a minute). Under load, many people searching the same term hit the cache instead of the database. - Because of this caching, many reads can be served from the edge instead of my server. That helps keep it cheap to run. - "Editing" just creates a new snippet with a new id. Nothing is changed. - No accounts, no auth. An id just comes from the content, so there is nothing to own or protect.