Stateless architecture and resource planning
Alibaba Cloud Elasticsearch Agent Engine Edition uses a stateless architecture that lets you scale storage capacity, write throughput, and query capability independently. Object storage holds persistent data and bills you based on actual usage. You size compute resources to match your actual read and write loads, and plan the local cache around your active data.
For example, if only a small part of your growing historical knowledge base is accessed daily, you can store new data in object storage and concentrate compute and cache resources on the active data. This reduces the need to reserve resources for infrequently accessed data.
Data storage and component responsibilities
Component | Main responsibility | What to plan for |
Index node | Handles incoming writes, index building, and background merges, and stores the data that must be persisted in object storage. | Import throughput, sustained write volume, and index building overhead. |
Query node | Runs queries and caches the data they require locally. On a cache miss, it reads the data from object storage. | Query concurrency, vector retrieval overhead, active data sets, and cache capacity. |
Object storage | Stores index data, write logs, and the persistent state required to run the service. | No advance capacity purchase or manual expansion; billing based on actual usage. |
For the node configurations and access endpoints in the console, see Create and connect to an instance.
Independent scaling for write and query loads
Write peaks and query peaks do not have to share the same resource configuration. Add resources to the component that is the actual bottleneck, so that you do not waste resources by scaling out both sides for a single load:
When bulk imports or the sustained write volume increases, scale out index nodes to improve write and index building capacity.
When query concurrency increases, scale out query nodes to add query compute and cache resources.
When the total data volume grows but the active data barely changes, keep the local cache sized around the active data. Persistent storage grows with usage, and the local cache does not need to scale proportionally with the total data volume.
Node specifications and the number of nodes are subject to the configurations available on the purchase page, and shard planning, bulk concurrency, and query scope also affect resource utilization. If cold data access is slow, you can warm up the Slice cache on the query nodes before users open the knowledge base to reduce the read wait time of the first query.
Write acknowledgment and search visibility
To confirm a write by ID, use GET or mget, which read in real time by default and require no refresh. For the read boundaries when the primary shard is unavailable, see Confirm writes by ID. The following paragraphs describe when documents become visible to search queries.
Write acknowledgment and search visibility are two separate stages. A write is acknowledged after the write log is persisted. Data enters search results only after index nodes generate and publish a new searchable version and query nodes load that version. Therefore, a search issued immediately after a successful write request may not return the new documents for a short time.
For regular writes, do not pass refresh. Wait for the automatic background refresh instead, because publishing and loading data versions more frequently increases resource overhead. Synchronous waits are available under specific conditions. For the default refresh interval and these conditions, see Refresh and query visibility.
Query replicas, availability, and differences from traditional Elasticsearch
Queries are served by replica shards on query nodes. Plan both the query replicas and the query nodes that can host them against your availability targets. Persistent data alone does not mean that the query service is ready. After node changes or recovery, confirm that the service is available by running real queries, and observe the latency while the local cache recovers. If cold data access is slow, warming up the Slice cache reduces the read wait time of the first query.
You cannot directly reuse the data tiers, index lifecycle management (ILM), Translog, or replica wait parameters of traditional Elasticsearch. For details, see Differences from traditional stateful Elasticsearch. When you create a Collection, the query replica setting index.number_of_replicas defaults to 2. A value of 0 cannot serve queries, and a value of 1 meets only basic query requirements and does not provide query high availability (HA). In production environments, configure at least 2 query nodes so that an available replica can still serve queries when a single query node fails. Persistent data is held in object storage, and query replicas mainly handle query and cache work, so adding replicas cannot replace a backup strategy.