15 Performance and troubleshooting
This chapter covers
- Understanding the reasons for slow searches and indexing queries
- Tuning and improving the performance of slow queries and indexing
- Troubleshooting unstable clusters
Once the Elasticsearch cluster is ready for production, there are umpteen number of things that could go wrong: from users complaining about slow searches to unstable nodes, network issues, over-sharding troubles, memory problems, and more. Keeping the cluster’s health in a GREEN (healthy) state is a paramount task. Constantly keeping an eye on the cluster’s health and performance is one of the primary jobs of an administrator.
Troubleshooting an unstable cluster needs a good understanding of the inner workings of Elasticsearch, networking concerts, node communication, memory settings, as well as a bunch of APIs for nodes, clusters, cluster allocation, and other uses. Similarly, tweaking the configurations to understand the document models, appropriate refresh times, and so forth helps to tune the cluster for higher performance capabilities.
In this chapter, we will go over some common problems such as slow query and ingestion speeds so that you can understand the reasons behind them.. Because Elasticsearch is a complex and complicated distributed architecture, there are a handful of places one needs to look for fixes. We will discuss the most obvious and commonly applied solutions in this chapter.