Elasticsearch shard allocation algorithm
Demystifying shard allocation internals in Elasticsearch Note: This intended for people who want to understand internal workings of Elasticsearch shard allocation
Shard Allocation in ES is provided as service component named AllocationService. AllocationService is initiated and started by ClusterModule which is run in Master node and manages entire cluster level actions.
AllocationService is initiated here: AllocationService Github link
What AllocationService does ? This service manages the node allocation of a cluster.
Introduction to Asynchronous I/O
What is Asynchronous I/O ? Input and output i.e I/O operations on a computer can be very slow compared to the processing of data i.e CPU intensive work. An I/O device can incorporate mechanical devices that must physically move, such as a hard drive seeking a track to read or write; this is often orders of magnitude slower than the switching of electric current. For example, during a disk operation that takes ten milliseconds to perform, a processor that is clocked at one gigahertz could have performed ten million instruction-processing cycles.