Рассматривается задача организации распределенного хранения больших объе-мов данных в крупномасштабных кластерных системах. Представлен способ распределения данных по узлам кластера с использованием консистентного хеширования. Описаны базовый метод консистентного хеширования и усовер-шенствованный метод с использованием виртуальных узлов. Ключевые слова: распределенные хранилища, масштабирование базы данных, массивы данных, шардинг, высоконагруженные системыВведение. В настоящее время множество различных компаний сталкиваются с пробле-мами, связанными с постоянным увеличением объема данных, что отрицательно сказывается на производительности сервера базы данных. В отличие от "вертикального" масштабирова-ния (повышения производительности основного сервера) при "горизонтальном" масштабиро-вании серверы объединяются в кластер и вся нагрузка распределяется между ними [1]. Одна-ко в такой распределенной системе возникает проблема равномерного распределения данных внутри кластера, а также перераспределения данных при добавлении или удалении одного из серверов [2].Шардирование реляционной базы данных. Основным методом горизонтального мас-штабирования базы данных является шардинг [3] -разбиение большого массива данных на малые блоки и дальнейшее распределение их по узлам кластера. В случае реляционной базы данных такими блоками являются строки таблиц, которые при шардинге хранятся на различ-ных узлах [4]. Строка представляет собой множество элементов с уникальным идентифика-тором (первичным ключом):Основная задача при реализации шардинга -выбор механизма для определения узла, на котором будет храниться та или иная строка таблицы. Как известно [5], первой функцией определения принадлежности строки к конкретному узлу кластера является хеш-функция первичного ключа строки с последующим получением результата деления значения хеш-функции по модулю числа узлов в кластере, т.е. shard_id = hash key_id %N , где shard_id -идентификатор узла, key_id -идентификатор строки (первичный ключ), для которого считается значение хеш-функции, N -число узлов кластера [5].
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.