Изменения

Перейти к: навигация, поиск

Highload-2023: Отчёт Виталия Филиппова

2218 байтов добавлено, 20:42, 29 ноября 2023
Нет описания правки
== Барсик ==
BARSiC — '''Григорий Бутейко (VK, ВКонтакте) — BARSiC — асинхронная репликация и консенсус для 70 баз данных.'''
Хрень какая-тоПомните, честно говоряя же написал выше, что конфа — торжество велосипедов. Технических деталей было крайне малоВот, просто общая мысль - вотэто велосипед №1, им ничего готовое не подошло, Raft они почему-то сочли слишком сложным, поэтому сделали всё сами и на основе другого протокола - Viewstamped Replication аж от целой Бабы Лизы... то есть Барбары Лисковпрямо с открытия.
Полная фигня, 100 полуляхов из 250. Технических деталей работы алгоритма в докладе было крайне мало, просто общая мысль — вот, им ничего готовое не подошло, Raft они почему-то сочли слишком сложным (Raft, сложным?!), поэтому сделали всё сами и на основе другого протокола — Viewstamped Replication аж от целой Бабы Лизы… то есть Барбары Лисков. Я раньше про этот протокол вообще не слышал, уже после конфы почитал - почитал — так вот, архитектурно '''ОНО ВООБЩЕ НЕ ОТЛИЧАЕТСЯ ОТ RAFT-а''' — единственное реальное отличие — это то, точнеечто ноды голосуют не за первого заявившегося кандидата, отличаетсяа за кандидата с минимальным ID (IP-адресом). Всё остальное практически идентично, но Raft Term = VR View и так далее. Плюс есть небольшое отличие не смысловое, а именно в худшую сторону - особенностях реализации, но оно '''СЛОЖНЕЕ'''! не в пользу VR — VR тупо сложнее, например, там 10 типов сообщений вместо 4-х у Raft-а.
{{WikiCutBegin|Развёрнутое объяснение под катом, взял [https://groups.google.com/g/raft-dev/c/cBNLTZT2q8o отсюда]}}
paid less attention to Paxos and more to VR.
You're You’re right, Heidi, that Raft and VR/VRR are similar, and we
acknowledge this in the first page of the paper.
At a high level, you could argue they're they’re exactly the same. Lamport
would probably call them both Paxos. Their messaging pattern is
similar. Why they work is similar, and their proofs of correctness
could be similar.
At a low level, you could argue they're they’re very different. Raft'sRaft’s
mechanism is compact (VRR uses 10 message types where Raft uses 4 to
accomplish the same tasks). Raft spells out how to do leader election
And of course membership changes are entirely different.
Now (2015), there's there’s a huge difference in completeness. Raft has
several implementations including membership changes and log
compaction, some evaluation, a proof or two, my dissertation (a lot of
discussion about design choices), and many online resources to help
people learn. I don't don’t think VR/VRR is competitive with any of thatcurrently. For example, I just searched GitHub for "Viewstamped«ViewstampedReplication" Replication» and found only one project; searching "VRR" «VRR» yields noise.
Paper-wise, I'm I’m biased, but I think the Raft paper is more accessibleto beginners. That's That’s because the Raft paper explains the why, and the
VRR paper just tells you the what.
better than in VRR. I discuss this in the related work in my
dissertation. The original VR has the view manager tell the new leader
to start, yes, but it doesn't doesn’t have to transmit any log entries. And Istill don't don’t feel great about the leader being a function of the view
(term) number. It feels misleading, since of course different servers
might be in different views, especially during leader changes. But I
haven't haven’t implemented or evaluated that approach.
We (John and I) actually didn't didn’t know about the VRR paper until after
we had started Raft. I think the earliest time someone mentioned it to
us was three days before our first paper submission on Raft, in
September 2012, buried in an email with a bunch of other pointers.
Would we have used VRR instead of creating Raft if we knew abut it in
time? I'm I’m not sure, but it definitely would have been a better
starting point for us.
Know of any performance evaluation between these two protocols? Nope.
Normal-case operation would be the same, so you'd you’d probably have to
compare leader changes. And I feel like that depends on the details of
how you "optimize" «optimize» VRR, so I don't don’t know if it'd it’d be apples-to-apples. Hope I haven’t offended anyone, and hope this helps,Diego{{WikiCutEnd}} Причём аргументы, согласно которым им не подошли готовые решения, меня лично вообще не убедили. Какое-то расхождение данных и метаданных при использовании внешнего сервиса консенсуса… не, ну писать просто надо нормально, что значит — расхождение. Я же юзаю etcd в Vitastor, брат жив. Ну ладно я, ещё пример — TiDB юзает встраиваемый etcd, брат тоже жив. Всё ещё мало? Patroni/Stolon испокон веков юзают Consul/etcd — и тоже все довольны.
Hope I haven't offended anyoneХоть бы исходники открыли, and hope this helpsё-моё,Diego {{WikiCutEnd}}хоть какая-то польза была бы от этого барсика.А то ну написали тесты, ну пофаззили, ну дополнительно верифицировали на TLA+, ну молодцы. Но какой во всём этом толк, если рядом лежит штук 10 «вот таких же, только меньше, но других», тоже хорошо оттестированных за годы Raft-ов…
== Оптимизации Go ==

Навигация