Task scheduling mechanism and system based on consistent hash algorithm
The invention provides a task scheduling mechanism and system based on a consistent hash algorithm. The method comprises the steps of obtaining a hash value of an available execution unit and a hash value of a task to be executed; distributing the hash value of the execution unit and the hash value...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a task scheduling mechanism and system based on a consistent hash algorithm. The method comprises the steps of obtaining a hash value of an available execution unit and a hash value of a task to be executed; distributing the hash value of the execution unit and the hash value of the task to a consistent hash ring; obtaining the execution times of the task; choosing a search direction; searching for n hash values of corresponding execution units closest to the position of the hash value of the task on the consistent hash ring according the search direction; enabling the value of the n is equal to the value of the execution times; obtaining n execution units corresponding to the hash values of the n corresponding execution units; establishing a mapping relation between the task and the n execution units; establishing a mapping table from the execution units to the task according to the mapping relation. According to the task scheduling mechanism, the consistent hash algorithm is applied t |
---|