News for hackers. Stuff that matters.
Re:Facebook open-sources LogDevice, a distributed storage fo... by AhmedSoliman on Wednesday September 12, 2018 @12:28PM (#17970401)
Happy to finally see LogDevice open. We have been working on this for years now.
Re:Facebook open-sources LogDevice, a distributed storage fo... by thinkersilver on Thursday September 13, 2018 @10:30AM (#17978860)
Hi Ahmed,

I imagine you looked at other solutions before starting this. A distributed log is a fairly simple idea to understand (hard to implement) but what pain point is being solved?

Seeing that it is written in C/C++ - would it be that logdevice is optimised purely for speed and responsiveness?

Re:Facebook open-sources LogDevice, a distributed storage fo... by the_duke on Thursday September 13, 2018 @03:57AM (#17976842)
Can you give an overview over the difference to eg Apache Kafka?

It seems very similar.

Re:Facebook open-sources LogDevice, a distributed storage fo... by AhmedSoliman on Thursday September 13, 2018 @04:30AM (#17976973)
It's a very different architecture and design. You can head to https://logdevice.io/docs/Concepts.html to learn more about how LogDevice works.

In terms of function. LogDevice is similar to the core of Apache Kafka.

Re:Facebook open-sources LogDevice, a distributed storage fo... by majidazimi on Thursday September 13, 2018 @05:17AM (#17977171)
True, but Kafka has two very annoying features built into it:

- There is no many-to-many log recovery whereas -- for example in Pulsar/DistributedLog -- logs are stored in small segments and distributed to multiple nodes.

- Read scalability. Since all the log is stored in one node (with some replicas) the readers are bound to single disk sequential read capacity. Again Pulsar stores logs in segments that are distributed among broker nodes which helps a lot when there are many readers.

Re:Facebook open-sources LogDevice, a distributed storage fo... by sh00s on Thursday September 13, 2018 @02:51PM (#17981279)
LogDevice has many-to-many rebuilding as well, and typically data for a log (similar to partition in Kafka) is spread relatively uniformly over the (potentially large, much bigger than replication factor) set of shards that hold data for that log.
Re:Facebook open-sources LogDevice, a distributed storage fo... by LgWoodenBadger on Thursday September 13, 2018 @09:08AM (#17978289)
I'm not sure how accurate your comment is regarding Kafka's annoying features given that Kafka has partitions, which "solve" all of the problems you stated.
Re:Facebook open-sources LogDevice, a distributed storage fo... by majidazimi on Thursday September 13, 2018 @11:54AM (#17979577)
No it doens't, since a single partition is stored sequentially on one disk which limits the consumers to bandwidth of single disk (say c1 reads beginning of the partition and c2 end of the partition). But in the case of Pulsar c1 is most probably connected to a different node than c2.
Re:Facebook open-sources LogDevice, a distributed storage fo... by adrienconrath on Thursday September 13, 2018 @02:54PM (#17981311)
LogDevice has this concept of "node set", which is the set of storage nodes that can be selected by the sequencer as recipients for a record or a block of records. A typical node set size is around 20-30 in our deployments. Each storage node in the node set contains a subset of the records (or blocks of records) of the log, we call that subset a log strand. The amount of IO capacity available to append records to a log or read records from a log scales with the size of the node set.

All of this is done while preserving the total ordering guarantee thanks the separation of sequencing and storage.

The operator could for example set a bigger node set size for logs that are known to have multiple consumers and require more IO capacity.

At facebook, we have use cases where a single consumer will need to replay a backlog of records in a log, sometimes hours or days worth of data to rebuild its state. We call this a backfill. Node sets allow the IO to be spread across multiple disks which improves backfill speed and helps reduce hotspots.

-- Adrien from the LogDevice team.

Re:Facebook open-sources LogDevice, a distributed storage fo... by sh00s on Thursday September 13, 2018 @02:51PM (#17981289)
splitting data into partitions would mean there's no total order on that data anymore, right?
Re:Facebook open-sources LogDevice, a distributed storage fo... by LgWoodenBadger on Thursday September 13, 2018 @03:00PM (#17981371)
Kafka only guarantees a total order within a given partition, not across them.
Re:Facebook open-sources LogDevice, a distributed storage fo... by Dowwie on Thursday September 13, 2018 @06:36AM (#17977512)
Does it require at least one fully dedicated FTE to set up, maintain, and use correctly?

Curious where logdevice would be a bad decision..

Re:Facebook open-sources LogDevice, a distributed storage fo... by tveita on Thursday September 13, 2018 @11:43AM (#17979492)
From what I can see this doesn't have built-in consumer balancing and offset storage, like Kafka does. It also lacks more exotic Kafka features like topic compaction and exactly-once processing.

In Kafka bulk reading is very cheap, the broker basically just calls sendfile() to send a file segment with compressed message chunks. On the other hand only the leader of a partition can serve requests, so you are often limited by bandwidth. It looks like LogDevice has to do a bit more work server side, but may be able to read from all servers with a replica.

Kafka stores more metadata in the record wrapper, like client and server timestamps and partition key.

There are client libraries for C++ and Python.

Operationally they look similar - both require a Zookeeper cluster, and both require assigning permanent ids to nodes.

It would be interesting to see some benchmarks comparing LogDevice with Kafka and Pulsar. That said, I suspect from the lack of buzz around Pulsar that Kafka isn't a performance bottleneck for most people using it.

Re:Facebook open-sources LogDevice, a distributed storage fo... by manigandham on Thursday September 13, 2018 @06:36PM (#17983306)
Kafka is also very embedded everywhere now, with a big first-mover advantage. Pulsar already does everything Kafka does but also supports custom functions, per-message acknowledgements, and native cross-region replication.

Unfortunately it's hard to change something that already works. Most users don't hit the performance limits of their tools so they'll just continue Kafka if it's already running.

Re:Facebook open-sources LogDevice, a distributed storage fo... by martincmartin on Wednesday September 12, 2018 @11:04PM (#17975636)
Congrats Ahmed!