Two Seconds And Four Hundred Million

A marketplace brief carries one line with a number in it:

A price change appears in search results within 2 seconds.

The catalogue holds 400 million live listings. Which design does that one line rule out?

A

Keeping the price in the listings database. Search needs its own copy, so the field has to move out to a service of its own.

B

Rebuilding the search index on a schedule. The freshest a periodic rebuild can be is one full pass, and no pass over 400 million documents finishes in 2 seconds, so price changes have to reach the live index one at a time.

C

Caching search responses. Any TTL longer than 2 seconds breaks the promise, so the result cache has to come out of the read path.

D

Asynchronous propagation. A 2 second commitment puts the index write in the same transaction as the price write.