Caching Elasticsearch vs Redis

Architecture to support 2D GeoQuery

As a background, I’m attempting to test a database to power backend of an app that matches users with other users based on time and coordinates (with preference for geoproximity but also adaptability to adjust time scare if no or few matches found nearby) based on user generated string search query (with hopefully some natural language clustering/suggestion generation).

Received this recommendation from a friend: “Install as clusters on DigitalOcean using $near 2D GeoQuery in MongoDB. Additionally filter data and store in REDIS and perform REDISsearch.”

Could anyone please share their thoughts on whether this would be a working solution and how functionality would differ from Elasticsearch? And why DigitalOcean over MongoDB’s cloud hosting with AWS?

Or any other possible stack configurations (the simpler the better since no network engineers)? In terms of simplicity I was wondering if it were simply possible to use MongoDB at least for now.

Another perspective:

https://docs.mongodb.com/manual/geospatial-queries/

Depends on your loads, Elasticsearch, Redis, and other configurations may be unnecessary. MongoDB with indexes could be very fast without additional caches and other stuff

Not sure how you want to use time in geospartials, but if it is something like "was near you 5 hours ago", this is just another stage in pipeline.”

Thoughts please?

Much appreciated.

Elasticsearch has excellent support for geospatial searches.

Those searches can also be combined with time-based elements term based filters and full text search.

So we can absolutely answer "were you near me 5 hours ago"

We have many customers using Elasticsearch for their geospatial requirements at speed at scale.

Think of many of those ride sharing apps, yelp apps etc.... Many are powered by Elasticsearch.

You can test it easily by using Elastic Cloud and with a 14-day trial. The only official posted version of Elasticsearch

cloud.elastic.co

Geo data types

Geo Queries

Maps in Kibana

We just released even more capabilities like geofence alerts

2 Likes

Hi Stephen,

Thank you very much for your response!

Are there any performance benefits from using a managed provider such as DigitalOceans (which I believe only supports Redis… are there any you would recommend that support Elastic?) In other words do MongoDB and caching service “talk” to one another faster when using same managed provider or do they perform better when kept siloed on their own native cloud hosting?

I will certainly read and I am currently testing both Redis and Elastic. Are there any specific features on Elastic that could be helpful for this particular deployment that I missed or is it more a comparison of price and performance rather than functionality?

Redis and Elastic are pretty different ... I think you will need to do your research.

Also I would wonder for this data why you would need MongoDB and Elasticsearch ... perhaps Elasticsearch could do it all ... but I don't know enough about you data... but many...many customers use Elasticsearch for VERY FAST geospatial searches as well as Full Text Search, Faceting etc. at Scale.

There are also MANY case where customers front their Operation Data Stores with Elasticsearch for all its powerful, rich, fast search capabilities and to offload that search volume off their ODSs.

As far as where to run Elasticsearch, I would only recommend Elastic Cloud cloud.elastic.co

Good Luck, Let us know if you have any specific questions.

Perhaps someone else will have an opinion.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.