We are using Aerospike’s query feature with geo point in a polygon filter. WE have created GEO2DSPHERE secondary index on the bin, but we see that it is taking ~150ms for a single call.
When run at throughput ~10k with concurrency ~80, the response time reached ~2 seconds and this keeps on increasing at higher load.
The set that we are querying has no more than 50 records and geo bin contains upto 50 polygons each.
Aerospike machine configuration- 3 boxes (2 core, 8Gb ram, 200Gb dp2 disk)
Please let us know if we are missing some configuration or if we can tune our Aerospike cluster better
In general the GEO2DSPHERE index may return a lot of false positives, with the decision on whether the polygons contain a specific point narrowed down post-retrieval in a fairly CPU intensive way. Larger regions are more susceptible to this outcome. 50 regions is a tiny number, and they’re likely to be very big.
One thing you should do is chop those polygons into smaller cells. That will lead to less overlap and a shorter computation time, lowering your latency.
Beyond that there’s configuration tuning and using an appropriate version. Which release of Aerospike CE are you using? Can you post the configuration you’re using, especially service
and the namespace
configuration for this specific namespace? (the entire config would help, if you’re comfortable with that). Not sure what a dp2 disk is. Are you on bare-metal or in a virtualized environment like Amazon EC2?