Couchbase Server 4.0 introduced Global Secondary Indexes (GSI) to support the N1QL query engine, but managing these indexes was manual and required high availability configuration, node addition or removal, and index rebalancing after failures. With Couchbase Server 5.0, automatic replication and rebalancing of GSIs are now built-in, allowing users to specify the number of replicas and automatically manage their placement across nodes, server groups, and availability zones. This enables better index availability and manageability, and supports rebalancing without downtime. Users can also adjust the number of replicas after index creation using an upcoming ALTER INDEX statement.