Searching from the front-end or the back-end? What do you recommend?
We highly recommend front-end search.
A front-end implementation hits our servers directly, without going through your back end. It can be up to 10x faster for the end user to retrieve results.
We provide a distributed API, allowing you to select multiple data centers around the world. This lets your users target the closest server, which has a significant impact on latency. This can only work with a front-end implementation.
With a back-end implementation, you’re forcing some network routes. Even if there’s only a local problem in the network, this affects all users. Using a front-end implementation means that only a subset of your users are affected when there’s a network issue.
What is front-end search?
What type of user experience you create is entirely flexible—Algolia can power a wide array of potential search patterns. When you query Algolia, the engine returns a JSON response, which allows you to consume the search results easily and craft any experience. The response contains a breadth of useful information beyond matching results. You get access to the total number of matches, pagination, computed facets, highlighting, and more.
So, while your server remains responsible for many Algolia-related activities—like importing and updating data or configuring indices—it doesn’t need to get involved in the search experience.
If you feel like a back-end implementation would still work better in your case, don’t hesitate to get in touch with us.