4 ms·
Early on they built a Rails app backed by Postgres [0] to store, these days, 500 million items. Then in this post [1] they say they're rearchitecting the datab
by nattaylor 6y ago
Early on they built a Rails app backed by Postgres [0] to store, these days, 500 million items. Then in this post [1] they say they're rearchitecting the database, then mention Snowflake. It sounds to me like they need a document store like Lucene in order to get fast search performance--but they may be optimizing for other use cases like tracking orders which is probably easier in a RDMBS.
It also looks like they might first do all the work to retrieve all the results for a query. The first request is to an endpoint `search_v3/{term}?cache_key={key}` then subsequent requests are to `asyncresultset_{n}?cache_key={key}` so seems like they might have the result set cached from the first query.
The response to the autocomplete endpoint, which is fast, contains an `elastic_id` so perhaps they do partially use a document store.
[0] - https://stackshare.io/posts/the-tech-behind-instacarts-grocery-delivery-service https://stackshare.io/posts/the-tech-behind-instacarts-groce...
[1] - https://tech.instacart.com/the-story-behind-an-instacart-order-part-1-building-a-digital-catalog-46df5a8ff705 https://tech.instacart.com/the-story-behind-an-instacart-ord...