Microsoft Azure Stack is an extension of Azure – bringing the agility and innovation of cloud computing to your on-premises environment and enabling the only hybrid cloud that allows you to build and deploy hybrid apps anywhere. We bring together the best of the edge and cloud to deliver Azure services anywhere in your environment.

Finding Azure Search: How Autocosmos.com found time and success

A responsive and accurate implementation of search is crucial to the success of numerous websites and applications. In many instances, a user's only convenient path to their desired content is through the search bar. Poor search results or slow response times not only prevent users from finding what they're looking for, but it can also drive them away from using the website or application.

In this blog post, I will explore how Autocosmos.com used Azure Search to add an easily-maintained search experience to their site, adjusted their architecture to reduce costs, and subsequently saw favorable increases in some unexpected metrics.

The Problem: Identifying a painless full-text search solution

Listing car classifieds and news content, Autocosmos has been serving countries throughout North and South America since 1999. Since Azure Search was released during the timeframe of Autocosmos' hunt, and they were already using SQL Azure, they decided to give it a shot. Autocosmos hosts thousands of automobile listings and news articles for their users. As their user audience and traffic grew, they realized they would need to revamp their search feature. They store both news articles and automobile classifieds in an Azure SQL database. For the new and used car listings, regular SQL queries proved sufficient. However, these SQL queries wouldn't cut it for full-text search over the news content. This was when Autocosmos began their hunt for an effective and painless solution for their news search experience.

Autocosmos first turned to open source offerings from the Apache Foundation. Using Apache Solr running on their own servers, they were able to leverage the power of Lucene's full text indexing and search capabilities. However, operating the Solr servers proved to be too cumbersome of an investment. Managing the servers, scaling up and down, and other required maintenance activities significantly distracted Autocosmos' engineers from working on other parts of the site. Autocosmos then moved to ElasticSearch, a more comprehensive search engine implementation, also built around Apache Lucene. Unfortunately, ElasticSearch's required infrastructure still needed significant overhead investment from the engineers.

At this point, it became apparent that managing and scaling an open-source search solution on their own servers was too costly of an engineering investment.

The Solution: Azure Search

Autocosmos decided it would be best to turn to a managed search-as-a-service to solve their search problems. Switching to Azure Search turned out to be easy and also worthwhile.

"The first implementation that we did on Lucene, it took us two or three weeks. By the time Azure Search launched, we got it up and running in under two days."

- Miguel Angel Saez, Chief Technology Officer of Autocosmos.com

Their engineers were open to work on other problems and they saw increases in some favorable but unexpected metrics. First, let's take a look at how Autocosmos integrated Azure Search into their site to maximize performance and minimize cost. They pointed the search service at their SQL Azure database and easily moved the content into Azure Search using indexers to immediately make it searchable. This was painless and required very little up-front engineering investment.

Though Azure Search handled all the management and scaling for them, there were associated costs and Autocosmos wanted even further savings. They found a solution in Azure Redis Cache's distributed caching capabilities. Autocosmos then decided a cache-aside pattern was a great fit to store frequently searched results and even further improve their site's performance and availability.

In Autocosmos' implementation, the data store is actually the Azure Search index. With Redis Cache, Autocosmos was able to share a distributed cache of search queries and responses over all instances of the website. In this way, when a user types into the search box, the request first goes to the Redis Cache. The Azure Search service is queried only if the search request is not found in the cache. By architecting their search solution in this way, Autocosmos is able to both reduce their monetary costs and maintain high availability during peak hours with very little investment from their engineers.

This architecture is still what Autocosmos uses today and they have seen both positive and interesting results in a few different areas:

Response Time

After switching to Azure Search, Autocosmos immediately saw a drop in their query response times. On their open-source search service, they saw an average response time of more than seven seconds with peak response times lasting longer than 20 seconds. This was unacceptable for the quality of experience they wanted to deliver to their users. Implementing their search functionality using Azure Search immediately resulted in a drop in query response times to an average 0.68 seconds, with the slowest response being just over one second resulting in an average decrease in latency of 91%. Autocosmos now did not have to maintain or scale their own search infrastructure and they were seeing a rise in the quality of their user experience.

Usage

A data point Autocosmos did not expect to see as a result of their migration was a spike in page views. After adopting Azure Search, Autocosmos had a clear increase in their page views which coincided exactly with the drop in their search response times.

"We noticed that when we lowered by 90% the response times of our search pages, the traffic that those pages were receiving almost doubled.”

- Matias Quaranta, Software Engineer at Autocosmos.com

It seems that the increase in their website's quality after adding Azure Search drove their users to use the Autocosmos more than they already did.

Search Engine Optimization

Another unexpected result of migrating to Azure Search was the increase in Autocosmos' traffic. Right as Autocosmos adopted Azure Search, they saw an increase of nearly 25% in the amount of traffic coming from both Google and Bing.

"The amount of sessions derived from Organic Search (Google/Bing) shows a 400,000 increase during the December/January time lapse, that was when we finished our Azure Search implementation. We normally had around 1,700,000 sessions and raised it to 2,130,000+."

- Matias Quaranta, Software Engineer at Autocosmos.com

This increase is something neither Autocosmos nor the Azure Search team expected, but it is quite an interesting result of adopting a high quality search-as-a-service solution.

Autocosmos remains extremely satisfied with their Azure Search experience. The hunt was long and it wasn't their first option, but choosing a managed search-as-a-service turned out to be exactly what Autocosmos needed. By freeing up engineering resources, reducing monetary expenses and driving measurable impact across multiple metrics, Azure Search made search easy for Autocosmos and rewarding for their users.