- Newest
- Most votes
- Most comments
The performance issues you're experiencing with your OpenSearch setup for your e-commerce site are not uncommon, especially when dealing with a large number of products and complex sorting operations. Here are some suggestions to improve your query performance:
-
Optimize your query: The slow response time when filtering by price suggests that your query might not be optimized. Consider using a range query for price filtering instead of terms query if you haven't already.
-
Indexing strategy: Ensure that the fields you're frequently sorting or filtering on (like price) are properly indexed. You might want to consider using a sorted index on frequently used sort fields.
-
Increase resources: While your current setup (3 r7g.large.search nodes) is decent, you might benefit from increasing the number of data nodes or using more powerful instance types, especially if you're dealing with complex queries and large datasets.
-
Shard allocation: With 3 lakh (300,000) products, you might want to review your shard allocation. Ensure you have an appropriate number of shards for your data volume.
-
Caching: Implement and optimize caching strategies. This could include query caching, filter caching, and field data caching.
-
Use of scroll API: For large result sets, consider using the scroll API instead of deep pagination.
-
Upgrade consideration: While you're on a recent version (2.13), always keep an eye on newer versions that might offer performance improvements.
-
Monitor and tune: Use Amazon CloudWatch to monitor your cluster's performance and identify bottlenecks. You may need to adjust JVM settings or other cluster settings based on your specific workload.
-
Consider using OpenSearch Optimized Instances: These are designed to improve performance for heavy indexing use cases and could potentially help with your scenario.
Remember, performance tuning is often an iterative process. You may need to experiment with different configurations to find the optimal setup for your specific use case.
Sources
OpenSearch slow returning a big result set | AWS re:Post
Optimizing query performance for Amazon OpenSearch Service data sources - Amazon OpenSearch Service
Improve your Amazon OpenSearch Service performance with OpenSearch Optimized Instances | AWS Big Data Blog
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 3 years ago
