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)
Real-time GeoSearching at Scale with RediSearch by Apoorva Gaurav and Ronil Merchant of Bounce - Redis Day Bangalore 2020
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!
Ad

More Related Content

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
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 ranker
EosSoftware
 
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
 
Location Based System Documentation.docx
Location Based System Documentation.docxLocation Based System Documentation.docx
Location Based System Documentation.docx
Ayalneh2
 
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
 
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
 
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 ranker
EosSoftware
 
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
 
Location Based System Documentation.docx
Location Based System Documentation.docxLocation Based System Documentation.docx
Location Based System Documentation.docx
Ayalneh2
 
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
 
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
 
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
 

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
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
 
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
 
Ad

Recently uploaded (20)

Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Ad

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)
  • 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.