This article is available in French.
1. Nœuds et rôles #
Qui fait quoi.
Rôles #
# elasticsearch.yml d'un nœud data hot
node.name: es-hot-01
node.roles: [ data_hot, data_content, ingest ]
node.attr.zone: eu-west-3aLe nœud master élu maintient le cluster state : liste des nœuds, mappings, emplacement de chaque shard. Il faut un quorum de nœuds éligibles : avec 3 nœuds éligibles, le cluster tolère la perte d'un seul.
Erreur Courante : Deux nœuds éligibles master ne protègent de rien : la perte de l'un fait perdre le quorum. Utilisez 3 nœuds (ou 2 + un nœud voting_only).2. Shards et répliques #
La distribution des données.
Principe #
- Un index est découpé en shards primaires (fixés à la création) ; chacun est un index Lucene.
- Chaque primaire a des répliques (modifiables à chaud) : haute disponibilité et capacité de lecture.
- Une réplique n'est jamais placée sur le même nœud que son primaire.
- Statut green : tout est alloué ; yellow : des répliques manquent ; red : des primaires manquent.
3. Allocation et pannes #
Ce qui se passe quand un nœud tombe.
Allocation #
- Le nœud cesse de répondre : le master le retire du cluster.
- Les répliques de ses primaires sont promues primaires : aucune donnée perdue, le cluster passe en yellow.
- Après
index.unassigned.node_left.delayed_timeout(1 minute par défaut), de nouvelles répliques sont reconstruites sur les nœuds restants. - Au retour du nœud, Elasticsearch rééquilibre les shards.
GET _cluster/health
GET _cat/shards?v&h=index,shard,prirep,state,node,unassigned.reason
GET _cluster/allocation/explain
# répartir les répliques entre zones de disponibilité
PUT _cluster/settings
{ "persistent": { "cluster.routing.allocation.awareness.attributes": "zone" } }Bonne Pratique : Avec l'allocation awareness par zone, une réplique et son primaire sont toujours dans deux zones différentes : la perte d'une zone entière ne perd aucune donnée.
My progress
Sign in to track your progress and take notes. Sign in
Course Glossary
RBAC (Role-Based Access Control)
An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.
Authentication
The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).
Authorization
The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.
API Key
A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).
Architecture
The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.
Repository
A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...
Elasticsearch
A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.
Recommended Articles
Understanding the concept of score
The concept of score allows Elasticsearch to rank your documents by relevance during a search.
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...
License consumption types
Understand the evolution of billing in Dynatrace: the difference between the old licensing model ...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Grafana Alloy: Understanding and exploiting the User Interface (UI)
Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...
Grafana Alloy: Introduction and Architecture
Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...
Grafana Alloy: Syntax and Configuration (Alloy Language: River)
As part of a Grafana training or observability training, master the declarative syntax of Grafana...
Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)
Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...
Grafana Alloy: Log Management with Loki
Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...