SlideShare a Scribd company logo
Real-time Geo-Searching at Scale with RediSearch
Apoorva Gaurav - Senior Software Engineer - Bounce
Ronil Merchant - Senior Software Engineer - Bounce
PRESENTED
BY
Speakers:
Ronil Merchant (Software Engineer)
Pushkar Gupta (Software Engineer)
What is Bounce?
We are a Mobility startup providing dock-less scooter sharing solutions to consumers. It is
basically a service that enables you to pick up a scooter from anywhere and drop anywhere.
https://bounceshare.com/
1.3 Cr+
Trips
19k+
Fleet Size
5 Cr+
Kms Travelled
25 Lac+
Active Users
Positive Impact on how the city travels
PRESENTED
BY
1 Section 1
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
2 Section 2
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
3 Section 3
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
Agenda:
PRESENTED
BY
Problem Statement
Bike listing lies at the core of the user experience at Bounce
and since it marks the beginning of the user booking flow.
To give our users the best experience we need to list bikes
which are nearest to them and best match the user preferences
Hence bike discovery needs to be highly accurate as well as
have minimal latency.
PRESENTED
BY
Earlier Implementation
We have been traditionally using PostGres with the PostGis Extension to power geospatial
queries and search.
PRESENTED
BY
Challenges with current implementation.
Rapidly changing nature of our dataset (eg. We receive around 4k location updates per second) coupled
with the high throughput required at low latency ⚡ (We currently are at 1000 listings/second).
Difficult to handle this amount of scale on Postgres once we hit 10x scale (which has been the trend
over the last 10 months) as it will impact all db operations and a serious headache to Dev-ops and
platform team 😭😤!
Hence the use case essentially boiled down to having a db which performs extremely well in giving low
latency geo searching and document filtering capabilities in high write scenarios.
PRESENTED
BY
Approaches Evaluated
1. Postgres Scaling
2. Elasticsearch
3. RediSearch
PRESENTED
BY
Elasticsearch
● Ran geo distance filter query, along with some other filters (term queries).
● Were able to achieve ~1300 ops/s with set and get operations on a single r4,4xlarge instance with CPU hovering
around 50%. close to 1 lakh keys.
● Load tests were performed on a single node r4.4xlarge. Achieved response times of ~14ms for both reads and
writes at 1200 requests per second. overall more than 80k docs with below structure
PRESENTED
BY
Why not go ahead with Postgres scaling?
It would have been a stop gap solution as eventually at certain scale again we would have faced the same problems.
We are already on a db.m4.10xlarge
Also wanted to move towards a document based structure for the same again.
PRESENTED
BY
Motivation behind choosing Redis
Redis is known to thrive with excellent read and write performance in huge loads.
But bike discovery needs more than mere key value fetching and a certain amount of document querying
capabilities as well.
Come Redisearch to the rescue 🚑!
PRESENTED
BY
What is Redisearch?
As the name suggests it is a redis powered search engine.
It has full text search, filtering and geo filtering capabilities.
https://oss.redislabs.com/redisearch/index.html
PRESENTED
BY
Approach taken
There were 2 options to go ahead with.
1. Use redis geo index
https://oss.redislabs.com/redisearch/Overview.html#geo_index
2. Use geo hashes and index them and use search index.
https://en.wikipedia.org/wiki/Geohash
We did some tests evaluations based on both the approaches and decided to go ahead with the 2nd approach as
it gave better performance for our use case.
The tests overview will be shared later in the presentation
PRESENTED
BY
What is Geo Index?
As per the documentation, Geo indexes utilize Redis' own geo-indexing capabilities. In query
time, the geographical part of the query (a radius filter) is sent to Redis, returning only the ids of
documents that are within that radius.
An example geo query looks like
What is a GeoHash? 🤔
Geohash is a public domain geocode system
which encodes a geographic location into a
short string of letters and digits. It is a
hierarchical spatial data structure which
subdivides space into buckets of grid shape
PRESENTED
BY
As geohash searches are basically text based searches they should be faster as compared to geo index which
requires computations for whether the given coordinates are in search query.
We ran some tests evaluations to back up the same.
The tests overview will be shared later in the presentation
PRESENTED
BY
● Basically a document with relevant bike data for bike discovery was indexed to redis and filtering was done
based on geohash and other additional filters.
● Geohashes and most of the other string based filters (Status, Availability, bike_type, etc) were indexed as the
Tag data-type.
● Reason being we didn’t need to leverage the full text searching capabilities of redis and hence did not index the
fields as FULLTEXT .
● Also Significant performance gains were observed on using TAGS against FULLTEXT due to a having a limited
key set.
● GeoHash also has querying advantages also can be used to aggregate based on location, for various use cases
like demand pricing, etc.
PRESENTED
BY
Tests run
Stress tests run, with several types of schemas used.
1. with GEO field for location, and other filters as FULLTEXT.
2. Indexing filters as FULLTEXT and running exact match query (Lat/Lon being indexed). Using geohash for
location representation.
3. Indexing filters as TAG (Lat/Lon being indexed).
4. Indexing filters as FULLTEXT and running wild card search query. (lat/lon as no index).
5. lat lon fields as NOINDEX and all fields to be filtered upon as TAG.
PRESENTED
BY
Results
Case 1: Geo query and using exact search for other filters.
Reads: 85/s Latency: 120 ms
Writes: 85/s Latency: 125 ms
Case 2: All Filter fields defined as FULLTEXT and using exact search
Reads: 320/s Latency: 30 ms
Writes: 380/s Latency: 26 ms
Case 3: Filter fields defined as tag field. Also indexing lat and lon fields.
Reads: 400/s Latency: 18.42 ms
Writes: 1.01K/s Latency: 19.19 ms
PRESENTED
BY
A notably high
response time
is seen,
attributed to a
key explosion in
inverted index
due to updates
with randomly
changing lat/lon
values for
documents.
PRESENTED
BY
Case 4: Filter fields defined as FULLTEXT and using wildcard search. Also lat/lon fields are marked as NOINDEX
reads: 1.4k/s Latency: 6.5 ms
writes: 1.75k/s Latency: 5.5 ms
PRESENTED
BY
Case 5: Filter fields defined as TAG field and lat/lon fields are marked as NOINDEX
For 1.4k reads/s and 4.5k writes/s
Read latency: 3.5ms 💪🙌
Write latency: 4ms 👏😍
As we can see significant
performance gains were observed
when the lat/lon fields were marked as
NOINDEX.
Reason can be attributed from the
following excerpt from the
documentation.
https://oss.redislabs.com/redisearch/
Overview.html#index_garbage_collecti
on
In a nutshell a reduced keyspace in the
inverted index resulted in a
commendable boost in performance.
PRESENTED
BY
● Currently using a AWS DMS + Kinesis
infrastructure to live sync data from
Postgres to Redis.
● Dms task does CDC (Change data
Capture) for certain tables and loads it to
kinesis. A Consumer application reads
from kinesis and updates the data to
RediSearch
● Eventually certain high frequency
updates will be completely moved to
redis.
Final Implementation Overview
PRESENTED
BY
Final Implementation Overview
Schema looks something like this.
PRESENTED
BY
Final Implementation Overview
One of the caveats of using a geo hash is that a user can be at the edge of the geohash grid. To
make it closer to a radial search behaviour, we also consider the neighbouring grids for our
search query.
Query looks something on the lines of as shown below
PRESENTED
BY
Conclusion
● Moving towards document based Redissearch structure allowed extremely fast querying
on multiple filters.
● Also will help us reduce quite a huge chunk of writes on our primary postgres database.
● Moving to a document based structure also helped us to move away from expensive
joins.
● Additional use cases like filtering based on fuel or condition parameters can be easily
implemented as shown below.
PRESENTED
BY
Few Drawbacks would be that sorting based on distance was not possible via this approach,
hence we had to implement the same at application level.
Thank You!

More Related Content

Similar to Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil Merchant of Bounce - Redis Day Bangalore 2020

MineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White PaperMineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White Paper
Derek Diamond
 
OpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo ProjectOpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo Project
BYOUNG GON KIM
 
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
dbpublications
 
Building a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQLBuilding a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQL
Kudos S.A.S
 
Performance evaluation and estimation model using regression method for hadoo...
Performance evaluation and estimation model using regression method for hadoo...Performance evaluation and estimation model using regression method for hadoo...
Performance evaluation and estimation model using regression method for hadoo...
redpel dot com
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
bryanluman
 
Performance tuning in ranker
Performance tuning in rankerPerformance tuning in ranker
Performance tuning in rankerEosSoftware
 
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
IJCSES Journal
 
A comparative survey based on processing network traffic data using hadoop pi...
A comparative survey based on processing network traffic data using hadoop pi...A comparative survey based on processing network traffic data using hadoop pi...
A comparative survey based on processing network traffic data using hadoop pi...
ijcses
 
Schedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop clusterSchedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop cluster
Shivraj Raj
 
"Introducing Distributed Tracing in a Large Software System", Kostiantyn Sha...
"Introducing Distributed Tracing in a Large Software System",  Kostiantyn Sha..."Introducing Distributed Tracing in a Large Software System",  Kostiantyn Sha...
"Introducing Distributed Tracing in a Large Software System", Kostiantyn Sha...
Fwdays
 
H04502048051
H04502048051H04502048051
H04502048051
ijceronline
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/Subscribe
Sumant Tambe
 
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
IRJET Journal
 
Hadoop ecosystem framework n hadoop in live environment
Hadoop ecosystem framework  n hadoop in live environmentHadoop ecosystem framework  n hadoop in live environment
Hadoop ecosystem framework n hadoop in live environment
Delhi/NCR HUG
 
A sdn based application aware and network provisioning
A sdn based application aware and network provisioningA sdn based application aware and network provisioning
A sdn based application aware and network provisioning
Stanley Wang
 
MongoDB - General Purpose Database
MongoDB - General Purpose DatabaseMongoDB - General Purpose Database
MongoDB - General Purpose Database
Ashnikbiz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
B017320612
B017320612B017320612
B017320612
IOSR Journals
 
Leveraging Map Reduce With Hadoop for Weather Data Analytics
Leveraging Map Reduce With Hadoop for Weather Data Analytics Leveraging Map Reduce With Hadoop for Weather Data Analytics
Leveraging Map Reduce With Hadoop for Weather Data Analytics
iosrjce
 

Similar to Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil Merchant of Bounce - Redis Day Bangalore 2020 (20)

MineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White PaperMineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White Paper
 
OpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo ProjectOpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo Project
 
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
Hybrid Job-Driven Meta Data Scheduling for BigData with MapReduce Clusters an...
 
Building a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQLBuilding a Spatial Database in PostgreSQL
Building a Spatial Database in PostgreSQL
 
Performance evaluation and estimation model using regression method for hadoo...
Performance evaluation and estimation model using regression method for hadoo...Performance evaluation and estimation model using regression method for hadoo...
Performance evaluation and estimation model using regression method for hadoo...
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
 
Performance tuning in ranker
Performance tuning in rankerPerformance tuning in ranker
Performance tuning in ranker
 
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
A Comparative Survey Based on Processing Network Traffic Data Using Hadoop Pi...
 
A comparative survey based on processing network traffic data using hadoop pi...
A comparative survey based on processing network traffic data using hadoop pi...A comparative survey based on processing network traffic data using hadoop pi...
A comparative survey based on processing network traffic data using hadoop pi...
 
Schedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop clusterSchedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop cluster
 
"Introducing Distributed Tracing in a Large Software System", Kostiantyn Sha...
"Introducing Distributed Tracing in a Large Software System",  Kostiantyn Sha..."Introducing Distributed Tracing in a Large Software System",  Kostiantyn Sha...
"Introducing Distributed Tracing in a Large Software System", Kostiantyn Sha...
 
H04502048051
H04502048051H04502048051
H04502048051
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/Subscribe
 
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
IRJET - Evaluating and Comparing the Two Variation with Current Scheduling Al...
 
Hadoop ecosystem framework n hadoop in live environment
Hadoop ecosystem framework  n hadoop in live environmentHadoop ecosystem framework  n hadoop in live environment
Hadoop ecosystem framework n hadoop in live environment
 
A sdn based application aware and network provisioning
A sdn based application aware and network provisioningA sdn based application aware and network provisioning
A sdn based application aware and network provisioning
 
MongoDB - General Purpose Database
MongoDB - General Purpose DatabaseMongoDB - General Purpose Database
MongoDB - General Purpose Database
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
B017320612
B017320612B017320612
B017320612
 
Leveraging Map Reduce With Hadoop for Weather Data Analytics
Leveraging Map Reduce With Hadoop for Weather Data Analytics Leveraging Map Reduce With Hadoop for Weather Data Analytics
Leveraging Map Reduce With Hadoop for Weather Data Analytics
 

More from Redis Labs

Redis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redisRedis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redis
Redis Labs
 
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Redis Labs
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
Redis Labs
 
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
Redis Labs
 
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Redis Labs
 
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of OracleRedis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis Labs
 
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Redis Labs
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Redis Labs
 
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Redis Labs
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
Redis Labs
 
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Redis Labs
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Redis Labs
 
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Redis Labs
 
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
Redis Labs
 
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
Redis Labs
 
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Redis Labs
 
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Redis Labs
 
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Redis Labs
 

More from Redis Labs (20)

Redis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redisRedis Day Bangalore 2020 - Session state caching with redis
Redis Day Bangalore 2020 - Session state caching with redis
 
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
 
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
 
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
 
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of OracleRedis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
 
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
 
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
 
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
 
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
 
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
 
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
 
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
 
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
 
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
 

Recently uploaded

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 

Recently uploaded (20)

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 

Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil Merchant of Bounce - Redis Day Bangalore 2020

  • 1. Real-time Geo-Searching at Scale with RediSearch Apoorva Gaurav - Senior Software Engineer - Bounce Ronil Merchant - Senior Software Engineer - Bounce
  • 2. PRESENTED BY Speakers: Ronil Merchant (Software Engineer) Pushkar Gupta (Software Engineer)
  • 3.
  • 4. What is Bounce? We are a Mobility startup providing dock-less scooter sharing solutions to consumers. It is basically a service that enables you to pick up a scooter from anywhere and drop anywhere. https://bounceshare.com/
  • 5. 1.3 Cr+ Trips 19k+ Fleet Size 5 Cr+ Kms Travelled 25 Lac+ Active Users Positive Impact on how the city travels
  • 6. PRESENTED BY 1 Section 1 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. 2 Section 2 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. 3 Section 3 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Agenda:
  • 7. PRESENTED BY Problem Statement Bike listing lies at the core of the user experience at Bounce and since it marks the beginning of the user booking flow. To give our users the best experience we need to list bikes which are nearest to them and best match the user preferences Hence bike discovery needs to be highly accurate as well as have minimal latency.
  • 8. PRESENTED BY Earlier Implementation We have been traditionally using PostGres with the PostGis Extension to power geospatial queries and search.
  • 9. PRESENTED BY Challenges with current implementation. Rapidly changing nature of our dataset (eg. We receive around 4k location updates per second) coupled with the high throughput required at low latency ⚡ (We currently are at 1000 listings/second). Difficult to handle this amount of scale on Postgres once we hit 10x scale (which has been the trend over the last 10 months) as it will impact all db operations and a serious headache to Dev-ops and platform team 😭😤! Hence the use case essentially boiled down to having a db which performs extremely well in giving low latency geo searching and document filtering capabilities in high write scenarios.
  • 10. PRESENTED BY Approaches Evaluated 1. Postgres Scaling 2. Elasticsearch 3. RediSearch
  • 11. PRESENTED BY Elasticsearch ● Ran geo distance filter query, along with some other filters (term queries). ● Were able to achieve ~1300 ops/s with set and get operations on a single r4,4xlarge instance with CPU hovering around 50%. close to 1 lakh keys. ● Load tests were performed on a single node r4.4xlarge. Achieved response times of ~14ms for both reads and writes at 1200 requests per second. overall more than 80k docs with below structure
  • 12. PRESENTED BY Why not go ahead with Postgres scaling? It would have been a stop gap solution as eventually at certain scale again we would have faced the same problems. We are already on a db.m4.10xlarge Also wanted to move towards a document based structure for the same again.
  • 13. PRESENTED BY Motivation behind choosing Redis Redis is known to thrive with excellent read and write performance in huge loads. But bike discovery needs more than mere key value fetching and a certain amount of document querying capabilities as well. Come Redisearch to the rescue 🚑!
  • 14. PRESENTED BY What is Redisearch? As the name suggests it is a redis powered search engine. It has full text search, filtering and geo filtering capabilities. https://oss.redislabs.com/redisearch/index.html
  • 15. PRESENTED BY Approach taken There were 2 options to go ahead with. 1. Use redis geo index https://oss.redislabs.com/redisearch/Overview.html#geo_index 2. Use geo hashes and index them and use search index. https://en.wikipedia.org/wiki/Geohash We did some tests evaluations based on both the approaches and decided to go ahead with the 2nd approach as it gave better performance for our use case. The tests overview will be shared later in the presentation
  • 16. PRESENTED BY What is Geo Index? As per the documentation, Geo indexes utilize Redis' own geo-indexing capabilities. In query time, the geographical part of the query (a radius filter) is sent to Redis, returning only the ids of documents that are within that radius. An example geo query looks like
  • 17. What is a GeoHash? 🤔 Geohash is a public domain geocode system which encodes a geographic location into a short string of letters and digits. It is a hierarchical spatial data structure which subdivides space into buckets of grid shape
  • 18. PRESENTED BY As geohash searches are basically text based searches they should be faster as compared to geo index which requires computations for whether the given coordinates are in search query. We ran some tests evaluations to back up the same. The tests overview will be shared later in the presentation
  • 19. PRESENTED BY ● Basically a document with relevant bike data for bike discovery was indexed to redis and filtering was done based on geohash and other additional filters. ● Geohashes and most of the other string based filters (Status, Availability, bike_type, etc) were indexed as the Tag data-type. ● Reason being we didn’t need to leverage the full text searching capabilities of redis and hence did not index the fields as FULLTEXT . ● Also Significant performance gains were observed on using TAGS against FULLTEXT due to a having a limited key set. ● GeoHash also has querying advantages also can be used to aggregate based on location, for various use cases like demand pricing, etc.
  • 20. PRESENTED BY Tests run Stress tests run, with several types of schemas used. 1. with GEO field for location, and other filters as FULLTEXT. 2. Indexing filters as FULLTEXT and running exact match query (Lat/Lon being indexed). Using geohash for location representation. 3. Indexing filters as TAG (Lat/Lon being indexed). 4. Indexing filters as FULLTEXT and running wild card search query. (lat/lon as no index). 5. lat lon fields as NOINDEX and all fields to be filtered upon as TAG.
  • 21. PRESENTED BY Results Case 1: Geo query and using exact search for other filters. Reads: 85/s Latency: 120 ms Writes: 85/s Latency: 125 ms Case 2: All Filter fields defined as FULLTEXT and using exact search Reads: 320/s Latency: 30 ms Writes: 380/s Latency: 26 ms Case 3: Filter fields defined as tag field. Also indexing lat and lon fields. Reads: 400/s Latency: 18.42 ms Writes: 1.01K/s Latency: 19.19 ms
  • 22. PRESENTED BY A notably high response time is seen, attributed to a key explosion in inverted index due to updates with randomly changing lat/lon values for documents.
  • 23. PRESENTED BY Case 4: Filter fields defined as FULLTEXT and using wildcard search. Also lat/lon fields are marked as NOINDEX reads: 1.4k/s Latency: 6.5 ms writes: 1.75k/s Latency: 5.5 ms
  • 24. PRESENTED BY Case 5: Filter fields defined as TAG field and lat/lon fields are marked as NOINDEX For 1.4k reads/s and 4.5k writes/s Read latency: 3.5ms 💪🙌 Write latency: 4ms 👏😍
  • 25. As we can see significant performance gains were observed when the lat/lon fields were marked as NOINDEX. Reason can be attributed from the following excerpt from the documentation. https://oss.redislabs.com/redisearch/ Overview.html#index_garbage_collecti on In a nutshell a reduced keyspace in the inverted index resulted in a commendable boost in performance.
  • 26. PRESENTED BY ● Currently using a AWS DMS + Kinesis infrastructure to live sync data from Postgres to Redis. ● Dms task does CDC (Change data Capture) for certain tables and loads it to kinesis. A Consumer application reads from kinesis and updates the data to RediSearch ● Eventually certain high frequency updates will be completely moved to redis. Final Implementation Overview
  • 28. PRESENTED BY Final Implementation Overview One of the caveats of using a geo hash is that a user can be at the edge of the geohash grid. To make it closer to a radial search behaviour, we also consider the neighbouring grids for our search query. Query looks something on the lines of as shown below
  • 29. PRESENTED BY Conclusion ● Moving towards document based Redissearch structure allowed extremely fast querying on multiple filters. ● Also will help us reduce quite a huge chunk of writes on our primary postgres database. ● Moving to a document based structure also helped us to move away from expensive joins. ● Additional use cases like filtering based on fuel or condition parameters can be easily implemented as shown below.
  • 30. PRESENTED BY Few Drawbacks would be that sorting based on distance was not possible via this approach, hence we had to implement the same at application level.