Couchbase's Index Planner is a critical component of its indexing service, designed to optimize the placement of Global Secondary Indexes (GSI) for high availability and load balancing within a cluster. It uses probabilistic simulated annealing to determine the best distribution of indexes across indexer nodes, considering various load parameters such as index size and scan rate. The planner supports two main scenarios: new index creation and index service rebalance, adapting to hardware differences among nodes. It ensures high availability by placing index replicas on different nodes and respects server group configurations for rack zone awareness, distributing replicas across failover zones to maintain data resilience. Additionally, the Index Planner manages partitioned indexes by distributing their partitions across multiple nodes, enhancing load distribution and scan efficiency. It emphasizes flexibility in load distribution, ensuring that both partitioned and non-partitioned indexes benefit from optimal resource use and availability across the cluster.