> For the complete documentation index, see [llms.txt](https://wiki.ainzzorl.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.ainzzorl.lol/courses/mit-6.824-distributed-systems/object-storage-on-craq.md).

# Object Storage on CRAQ

<http://nil.csail.mit.edu/6.824/2020/papers/craq.pdf>

Video: <https://www.youtube.com/watch?v=IXHzbCuADt0>

* Chain replication. The basic approach organizes all nodes storing an object in a chain, where the chain tail handles all read requests, and the chain head handles all write requests. Writes propagate down the chain before the client is acknowledged, thus providing a simple ordering of all object operations—and hence strong consistency—at the tail. The lack of any complex or multi-round protocols yields simplicity, good throughput, and easy recovery.
* Apportioned queries: that is, dividing read operations over all nodes in a chain, as opposed to requiring that they all be handled by a single primary node.
* Eventual Consistency in our system implies that writes to an object are still applied in a sequential order on all nodes, but eventually-consistent reads to different nodes can return stale data for some period of inconsistency (i.e., before writes are applied on all nodes).
* Each node can store multiple versions on an object. When it receives a write, it's marked as "dirty". When it receives an ack from below it markes it as "clean". When handling a read, if the value is clean - return it. If it's dirty - check with the tail, return its version.
  * Read-heavy - load distributed mostly uniformly across all nodes in the chain. Life is good.
  * Write heavy - will need to check with the tail a lot. Not great, but tolerable.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.ainzzorl.lol/courses/mit-6.824-distributed-systems/object-storage-on-craq.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
