Hacker News new | ask | show | jobs
by chrismorgan 2975 days ago
But by the looks of it, the search backend isn’t being run all over the world, else latency would be decent.

The vast majority of the JavaScript is superfluous third-party libraries like AngularJS. The actual app is under 2,000 lines of code. I do not expect it would be difficult to cut the frameworks out of it at all, for a lighter and faster experience that only weighed a few kilobytes.

1 comments

Their search backend is, in my experience, significantly faster than you'd expect of latencies through a typical app backend - request-to-render in 10s of millis or less. They run their search indices directly inside an nginx module, it's an interesting architecture to read up on.

The JS they kick you off with is a pretty decent way to make a thorough, not-trivial search experience, you can get much more than a list of results (faceting and such builtin)

(https://community.algolia.com/instantsearch.js/)

The all-over-the-world bit is an optional part of paid plans, it's quite possible HN isn't using the global DSN